Detecting End of File with IDL_FileEOF()
IDL_FileEOF()
int IDL_FileEOF(int unit)
The IDL_FileEOF() function returns TRUE if the file specified by the Logical Unit Number unit is at EOF, and FALSE otherwise.
unit
The Logical Unit Number (LUN) of the file in question.