Determines whether the file pointer is positioned at the end of a file.
- Specifies the file handle number of the file to check for the end-of-file condition. FEOF(В ) always returns true (.T.) if you specify a file handle number of a communication port opened with FOPEN(В ).
This low-level file function returns true (.T.) if the file pointer is positioned at the end of a file opened with a low-level file function. FEOF(В ) returns false (.F.) if the file pointer isn't at the end of the file.
*** Open the file test.txt *** gnFileHandle = FOPEN('test.txt') *** Move the file pointer to BOF *** gnPosition = FSEEK(gnFileHandle, 0) *** If file pointer is at BOF and EOF, the file is empty *** *** Otherwise the file must have something in it *** IF FEOF(gnFileHandle) WAIT WINDOW 'This file is empty!' NOWAIT ELSE WAIT WINDOW 'This file has something in it!' NOWAIT ENDIF = FCLOSE(gnFileHandle)