QBasic 1.1: SEEK Function

Syntax

SEEK(filenumber%)
SEEK [#]filenumber%, position&

Description / Parameter(s)

filenumber% The number of an open file.
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.

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)