Use this command to determine whether you are at the end of a file. This is useful when you are reading in a file and want to know if you have finished reading all the contents or gotten to the end.
readXXXX commands performed when at the end of a file will fail, causing your script to fail, so it is good practice to call this command often when reading a file.
Disk I/O
isEndOfFile fileID |
Name | Type | Required | Comments |
---|---|---|---|
fileID | int | ID of file previously opened with fileOpen |
None
boolean
int $fileID; // Obtain file ID earlier do some operation to the file // ... while( `isEndOfFile` == false ) { // Read in something |
} |