Concept Framework 1.0 documentation | Contents | Index |
Name | Version | Deprecated |
fseek | version 1.0 | no |
number fseek(number fd, number offset, number origin) |
The fseek function moves the file pointer (if any) associated with fd to a new location that is offset bytes from origin. The next operation on the file takes place at the new location.
The argument origin must be one of the following constants: SEEK_CUR Current position of file pointer. SEEK_END End of file. SEEK_SET Beginning of file. For files opened in text mode, fseek has limited use, because carriage return-linefeed translations can cause fseek to produce unexpected results. The only fseek operations guaranteed to work on streams opened in text mode are: Seeking with an offset of 0 relative to any of the origin values. Seeking from the beginning of the file with an offset value returned from a call to ftell. Also in text mode, CTRL+Z is interpreted as an end-of-file character on input. In files opened for reading/writing, fopen and all related routines check for a CTRL+Z at the end of the file and remove it if possible. This is done because using fseek and ftell to move within a file that ends with a CTRL+Z may cause fseek to behave improperly near the end of the file. |
import standard.C.io |
Documented by Simona Plesuvu, generation time: Thu Oct 15 20:02:04 2009 GMT | (c)2009 RadGs Software |