Difference between revisions of "EOF"
Jump to navigation
Jump to search
Navigation:
imported>SMcNeill m |
imported>SMcNeill (style guidelines) |
||
Line 1: | Line 1: | ||
− | The | + | The [[EOF]] function indicates that the end of a file has been reached. |
− | |||
{{PageSyntax}} | {{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 0 until the end of a file. This avoids a file read error. | ||
− | * Returns -1 ( | + | * Returns -1 (true) at the end of the file. |
− | * [[CHR$]](26) can be used to denote the end of a 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 end of file.''' Read EOF after a GET to see if end has been reached and discard last read. | + | * '''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]] | * [[OPEN]] | ||
* [[LOF]], [[LEN]] | * [[LOF]], [[LEN]] |
Latest revision as of 17:44, 19 September 2017
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