lang • seek

SEEK

SEEK [ # ] Stream , Position

Defines the position of the stream pointer, for the next read/write operation.

If Position is negative, then the stream pointer is moved to a place relative to the end of the file.

To move the stream pointer after the end of the file, you must use the Lof function.

Examples

' Move to the beginning of the file
Seek #hFile, 0

' Move after the end of the file
Seek #hFile, Lof(#hFile)

' Move 100 bytes before the end of the file
Seek #hFile, -100

See also