[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
+---------------------------------+
| FEOF |
+---------------------------------+
FEOF(<expN>)
-----------------------------------
Determines if file pointer is positioned at end of a file.
Return value - Logical
-----------------------------------
If the file pointer is not at the end of the file, FEOF() returns the
value false (.F.).
When used with the FSEEK() command you may determine if a file is empty.
<expN>
File handle of file that you wish to check for end of file condition.
If you specify a file handle of a communications port opened with a
low-level file command, FEOF() will always return true (.T.).
+---------------------------------+
| Program Example |
+---------------------------------+
*** Open the file test.txt ***
file_handle = FOPEN('test.txt')
*** Move the file pointer to BOF ***
m_position = FSEEK(file_handle, 0)
*** If file pointer is at BOF and EOF, the file is empty ***
*** Otherwise the file must have something in it ***
IF FEOF(file_handle)
WAIT WINDOW 'This file is empty!' NOWAIT
ELSE
WAIT WINDOW 'This file has something in it!' NOWAIT
ENDIF
= FCLOSE(file_handle)
-----------------------------------
See Also: FCHSIZE(), FCLOSE(), FCOUNT(), FCREATE(), FERROR(), FFLUSH(),
FGETS(), FOPEN(), FPUTS(), FREAD(), FSEEK(), FSIZE(), FWRITE()
-----------------------------------
See Also:
FCHSIZE()
FCLOSE()
FCOUNT()
FCREATE()
FERROR()
FFLUSH()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson