EOF

From QB64 Phoenix Edition Wiki
Revision as of 14:45, 20 April 2022 by SMcNeill (talk | contribs) (Created page with "The EOF function indicates that the end of a file has been reached. {{PageSyntax}} : {{Parameter|endReached%%}} = EOF([#]{{Parameter|fileNumber&}}) {{PageDescription}} * {{Parameter|fileNumber&}} is the number of the file being read. '''#''' is not required. * Returns 0 until the end of a file. This avoids a file read error. * Returns -1 (true) at the end of the file. <!-- confusing statement; further details are required: * CHR$(26) can be used to denote th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The EOF function indicates that the end of a file has been reached.


Syntax

endReached%% = EOF([#]fileNumber&)


Description

  • fileNumber& is the number of the file being read. # is not required.
  • Returns 0 until the end of a file. This avoids a file read error.
  • Returns -1 (true) at the end of the file.
  • Note that GET can return invalid data at the end of a file. Read EOF after a GET operation to see if the end of the file has been reached and discard last read.


See also



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