Fstatus - Texas Instruments TI-89 Developer's Manual

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

576

FStatus

Declaration:
WORD FStatus (FILES * fsPtr )
Category(ies):
Files
Description:
Return the status of a file. FS_OK if no errors have occurred or
FS_ERROR if any errors have occurred. Note that errors accumulate so
that multiple writes may be done on a file as long as the status is checked
after the last write. The only way to clear the status is to close the file.
Inputs:
fsPtr — Pointer to FILES structure previously opened with FOpen.
Outputs:
FS_OK or FS_ERROR.
Assumptions:
None
Side Effects:
None
Availability:
On AMS 2.00 and higher.
TI-89 / TI-92 Plus
Differences:
None
See Also:
FOpen, FClose, FWrite, FPutC
Example:
FILE f1;
if (FS_OK == FOpen("APPDATA", &f1, FM_WRITE, "EXT" )) {
for( int i = 1; i <= 200; i++)
FPutC( i, &f1 );
FWrite( "123456", 6, &f1 );
if (FS_OK != FStatus( &f1 )) {
/* One of the FPutC calls or the FWrite ran out of memory */
FClose( &f1 );
Disp("ERROR writing to file");
FDelete( "APPDATA" );
return;
}
FClose( &f1 );
/* all writes were successful */
}
TI-89 / TI-92 Plus Developer Guide
Appendix A: System Routines — Files
/* only have partial file */
Not for Distribution
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents