1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-03 08:51:22 +00:00
qb64/internal/help/EOF.txt

25 lines
835 B
Plaintext
Raw Normal View History

2017-10-10 14:55:21 +00:00
The [[EOF]] function indicates that the end of a file has been reached.
{{PageSyntax}}
2017-10-10 14:55:21 +00:00
: {{Parameter|endReached%%}} = EOF([#]{{Parameter|fileNumber&}})
2017-10-10 14:55:21 +00:00
{{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.
2017-10-10 14:55:21 +00:00
* Returns -1 (true) at the end of the file.
2019-04-15 01:15:33 +00:00
<!-- confusing statement; further details are required: * [[CHR$]](26) can be used to denote the end of a file. -->
2017-10-10 14:55:21 +00:00
* '''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.
2017-10-10 14:55:21 +00:00
{{PageSeeAlso}}
* [[OPEN]]
* [[LOF]], [[LEN]]
* [[INPUT (file statement)]]
* [[LINE INPUT (file statement)]]
* [[GET]], [[PUT]]
2019-04-15 01:15:33 +00:00
{{PageNavigation}}