JavaScript Editor js editor     Web development 



Main Page

Determines whether the file pointer is positioned at the end of a file.

FEOF(nFileHandle)

Parameters

nFileHandle


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(В ).

Return Value

Logical

Remarks

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.

Example

В Copy Code
*** 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)

See Also



JavaScript Editor js editor     Web development 
R7