Appendix A: System Routines — Files
561
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
FEof
Declaration:
BOOL
FEof
(FILES *
fsPtr
)
Category(ies):
Files
Description:
Returns TRUE if a FILE is at the end.
Inputs:
fsPtr
— Pointer to a FILES structure opened with
FOpen
.
Outputs:
TRUE if a file is at the End of File mark. FALSE otherwise.
Assumptions:
Note that this is not an error condition (like returned by
FStatus
) and can
be changed not only by reading from a file but by changing the current file
position (see example).
Side Effects:
None
Availability:
On AMS 2.00 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: FOpen, FSetPos, FGetPos
Example:
FILE f1;
if (FS_OK == FOpen("APPDATA", &f1, FM_READ, "APP1" )) {
while (!FEof(&f1)) {
c = FGetC(&f1);
WinChar( w, c );
}
FSetPos( &f1, 0 ); /* rewind file, FEof should now return FALSE */
if (FEof(&f1))
Disp("FILE must have been empty");
}