EasyManuals Logo

Texas Instruments TI-89 Developer's Guide

Texas Instruments TI-89
1398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #620 background imageLoading...
Page #620 background image
578
Appendix A: System Routines — Files
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
FWrite
Declaration:
WORD
FWrite
(void *
buffer
, FSWORD
bytesToWrite
, FILES *
fsPtr
)
Category(ies):
Files
Description:
Write to a file returning FS_OK if successful. FS_ERROR if the file is not in
WRITE mode or FS_MEMORY if the system has run out of memory.
Inputs:
buffer
Buffer to write to file.
bytesToWrite
Number of bytes to write.
fsPtr
Pointer to FILES structure previously opened with
FOpen
.
Outputs:
FS_OK If successful.
FS_ERROR File is not in write mode.
FS_MEMORY Out of memory.
NOTE:
Any error will cause the file status to be set to FS_ERROR so that multiple
writes may be performed without checking the return status as long as an
FStatus
is done at the end to make sure all of the writes were successful.
Assumptions:
File is opened in WRITE mode.
Side Effects:
May cause heap compression.
Availability:
On AMS 2.00 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also:
None
Example:
FILE f1;
if (FS_OK == FOpen("APPDATA", &f1, FM_WRITE, "EXT" )) {
FWrite( "123456", 6, &f1 );
FWrite( "abc", 3, &f1 );
/* can check each FWrite or check FStatus when done with all writes */
if (FS_OK != FStatus( &f1 )) {
FClose( &f1 );
Disp("ERROR writing to file");
FDelete( "APPDATA" ); /* only have partial file */
return;
}
FClose( &f1 ); /* all writes were successful */
}

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals