SEEK statement

Purpose: SEEK sets the next read or write position in a file.


 Syntax:

 SEEK hFile, Offset%

 Parameters:

  • hFile Name of handle to file in which read or write position will be set.
  • Offset% is the byte location read or write position in file. The initial byte in a file is located at position 0.

Example:


 SEEK FP1, 8192

Result:

This example will move the file pointer to byte 8192 in the file.

BCX Console Sample Programs using SEEK function.

S113.bas