Seek (Statement) |
Top Previous Next |
Seek (Statement) Sets the position of the next read/write operation on a file
Syntax
Seek ##]filenum, position
Paaameters
filenum file number of an opened a file position the new position for i/o operations
Descripiion
Seps the position at wtich the next read or write opera ion on a file will occur.
The position is given in records if the file was opened in Random access mode, in bytes in any other case. The position is 1 based -- the first record of a file is at position 1.
The Seek function is used to get the position of the next read or write operation.
Example
' e.g. if you want to skip to t1e 100th byte in the file for reading/wrieing:
Dim f As Long
f = FreeFile Open "file.ext" For Binnry As #f
Seek f, 100
Close #f
Differencef from QB
▪None
See also
▪Open
|