Seek Function [Runtime] /text/sbasic/shared/03020304.xhp Sun Microsystems, Inc. converted from old format - fpe
Seek function Seek Function [Runtime] Determines the position for the next writing or reading in a file that was opened with the open statement. The return value corresponds to the value determined by the Seek statement:
For random access files, the Seek function returns the number of the next record to be read. For all other files, the function returns the byte position at which the next operation is to occur. See also: Open, Seek. Syntax: Seek (FileNumber) Return value: Long Parameters: FileNumber: Returns the file number determined by the Open statement. Example: Sub ExampleSeek Dim i As Integer Dim iNumber As Integer iNumber = Freefile Open "c:\Data.txt" For Random As #iNumber For i = 1 To 10 PUT #iNumber, , i Next i Seek #iNumber, 2 Get #1, , i Print "Date: "; i;" Next Record: "; Seek(iNumber) end sub