MAINSAIL Language Manual, Section 34.2

previous   next   top   contents   index   framed top   this page unframed


34.2. eof

Figure 34–2. eof
BOOLEAN
PROCEDURE   eof         (POINTER(filef);

eof (end-of-file) returns TRUE when the file pointer is positioned at or beyond the end of the file f. The preferred method of determining the end-of-file position of a file is $gotValue (see Section 36.21); eof is supported only for compatibility with older programs.

It is often a good idea to design file formats that indicate their own end-of-file, e.g., by some special data value, instead of relying on eof or $gotValue. Some devices do not have an end-of-file.


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Section 34.2