mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-14 22:43:54 +00:00
28 lines
871 B
Text
28 lines
871 B
Text
|
{{QBDLDATE:05-20-2022}}
|
||
|
{{QBDLTIME:23:13:05}}
|
||
|
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 the end of a 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.
|
||
|
|
||
|
|
||
|
{{PageSeeAlso}}
|
||
|
* [[OPEN]]
|
||
|
* [[LOF]], [[LEN]]
|
||
|
* [[INPUT (file statement)]]
|
||
|
* [[LINE INPUT (file statement)]]
|
||
|
* [[GET]], [[PUT]]
|
||
|
|
||
|
|
||
|
{{PageNavigation}}
|
||
|
|