EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

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 #612 background imageLoading...
Page #612 background image
570
Appendix A: System Routines — Files
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
FPutC
Declaration:
WORD
FPutC
(short
byte
, FILES *
fsPtr
)
Category(ies):
Files
Description:
Write a byte to a file opened in WRITE mode.
Inputs:
byte
BYTE to write.
fsPtr
Pointer to a FILES structure previously opened with
FOpen
.
Outputs:
Return FS_OK if successful. FS_ERROR if file is not opened for write
mode or FS_MEMORY if the system is 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:
The FILES structure pointed to by
fsPtr
must have been opened with
FOpen
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: FOpen, FRead, FSetPos, FStatus
Example:
FILE f1;
if (FS_OK == FOpen("APPDATA", &f1, FM_WRITE, "APP1" )) {
/* Can check each write */
for (int j = 1; j <= 9; j++)
if (FS_OK != FPutC( ‘2’, &f1)) {
Disp("ERROR writing to file");
return;
}
/* Or can check FStatus after all writes */
FPutC( 1, &f1 );
FPutC( 2, &f1 );
if (FS_OK != FStatus( &f1 )) {
Disp("ERROR writing to file");
return;
}
}

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