SEEK (statement)

From QB64 Wiki
Revision as of 21:28, 11 September 2009 by imported>Clippy (Created page with 'The '''SEEK''' statement sets the next byte or record position of a file for a read or write. ''Syntax:'' SEEK filenumber%, position% * The filenumber must be a file that i…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The SEEK statement sets the next byte or record position of a file for a read or write.


Syntax: SEEK filenumber%, position%


  • The filenumber must be a file that is OPEN.
  • Position is a byte in BINARY or sequencial files.
  • Position is the record in RANDOM files to read or write.
  • The SEEK statement can work with the SEEK function to move around in a file.


Example: A SEEK statement moving to the next random record in a file.

SEEK 1, SEEK(1) + 1


Navigation:

Go to Keyword Reference - Alphabetical

Go to Keyword Reference - By usage