NAME
SEEK Function and Statement
SYNOPSIS
SEEK(filenumber%)
SEEK [#]filenumber%, position&
o filenumber% The number of an open file.
o position& The position where the next read or write occurs. For
random-access files, a record number. For other files,
the byte position relative to the beginning of the file.
The first byte is at position 1.
DESCRIPTION
The SEEK function returns the current file position.
The SEEK statement sets the file position for the next read or write.
Example:
OPEN "TEST.DAT" FOR RANDOM AS #1
FOR i% = 1 TO 10
PUT #1, , i%
NEXT i%
SEEK #1, 2
GET #1, , i%
PRINT "Data: "; i%; " Current record: "; LOC(1); " Next: "; SEEK(1)
SEE ALSO
GET (File I/O) PUT (File I/O) OPEN