SEEK: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
The '''SEEK''' function returns the current byte or record position in a file.
The '''SEEK''' function returns the current byte or record position in a file.




Line 14: Line 13:




''See also:''
{{PageSeeAlso}}
*[[SEEK (statement)]]
* [[SEEK (statement)]]
*[[LOC]]
* [[LOC]]




{{PageNavigation}}
{{PageNavigation}}

Revision as of 01:04, 29 January 2023

The SEEK function returns the current byte or record position in a file.


Syntax

byte = SEEK(filenumber&)


  • Filenumber is the number of an OPEN file in any mode.
  • In RANDOM files SEEK returns the current record position.
  • In BINARY or sequencial files SEEK returns the current byte position(first byte = 1).
  • Since the first file position is 1 it may require adding one to an offset value when documentation uses that position as 0.
  • Devices that do not support SEEK (SCRN, CONS, KBRD, COMn and LPTn) return 0.


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link