Seek Function

 

Seek (filenumber)

 

The parameter filenumber  is used in the open statement and must be a valid numeric expression.

 

Seek returns a number that represents the byte position where the next operation is to take place.  The first byte in the file is at position 1.

 

Related Topics: Open

 

 

Example:

 

Sub Main

    Open "TESTFILE" For Input As #1  ' Open file for reading.

    Do While Not EOF(1)       ' Loop until end of file.

   MyChar = Input(1, #1)   ' Read next character of data.

   Print Seek(1)    ' Print byte position  .

    Loop

    Close #1        ' Close file.

End Sub