Function to check if the file pointer is at the end of an ASCII file
The FEOF() returns a logical true (.T.) if the file pointer is at the end of the specified ASCII file. The ASCII file is specified by its file handle <expN>. The file handle should be assigned to a memory variable when the file is opened with the FCREATE() or FOPEN() functions.
open database southwind use shippers copy to ship.txt type csv fd=fopen("ship.txt") do while .t. cGetLine = fgets(fd) if feof(fd) exit else // process endif enddo fclose(fd)