Fcreate - Texas Instruments TI-89 Developer's Manual

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

Advertisement

Appendix A: System Routines — Files

FCreate

Declaration:
WORD FCreate (char * fileName , char * typeName )
Category(ies):
Files
Description:
Create an empty file. Normally only needed if multiple files must be
simultaneously opened in write mode. Return value same as FOpen.
typeName is the same value normally passed to FOpen.
Inputs:
fileName
typeName — Must point to a string of, at most, four characters that
Outputs:
Same return value as FOpen.
Assumptions:
Same as FOpen.
Side Effects:
May cause heap compression or invalidate any current HSYMs.
Availability:
On AMS 2.00 and higher.
TI-89 / TI-92 Plus
Differences:
None
See Also:
FClose, FOpen
Example:
static char fType = "DAT";
FILES f1, f2;
if (FS_OK == FCreate("f1", fType) && FS_OK == FCreate("f2",fType)) {
if (FS_OK == FOpen( "f1", &f1, FM_WRITE, fType )) {
if (FS_OK == FOpen( "f2", &f2, FM_WRITE, fType )) {
writeToFile( &f1 );
readFromOtherFile();
writeToFile( &f2 );
writeToFile( &f1 );
FClose( &f2 );
}
FClose( &f1 );
}
}
TI-89 / TI-92 Plus Developer Guide
— String pointer to name of file to create.
describes the file type (FS_ERROR is returned if it does
not).
Not for Distribution
559
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