558
Appendix A: System Routines — Files
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
FClose
Declaration:
WORD
FClose
(FILES *
fsPtr
)
Category(ies):
Files
Description:
Close a file. This is required for files opened in WRITE mode. For files in
READ mode just updates the
fsPtr
->fileMode and
fsPtr
->fileStatus fields.
Inputs:
fsPtr
— Pointer to a FILES structure that was previously opened with
FOpen
.
Outputs:
Return FS_OK if file successfully closed. There is extra overhead required
for a FILE that is always kept around by the FILE system and so closing a
FILE will only return an error if the file or the heap has been damaged.
Assumptions:
None
Side Effects:
None
Availability:
On AMS 2.00 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: FAccess, FOpen, FStatus
Example:
FILE f1;
if (FS_OK == FOpen("AF1", &f1, FM_WRITE, "APP1" )) {
FWrite( "LINE 1\n", 7, &f1 );
FWrite( "LINE 2\n", 7, &f1 );
FClose( &f1 );
WinStr( &appW, "AF1.APP1 created\n");
} else
WinStr( &appW, "AF1 Failed!\n");