EasyManua.ls Logo

Texas Instruments TI-89 - Fgetsize

Texas Instruments TI-89
1398 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
566
Appendix A: System Routines — Files
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
FGetSize
Declaration:
FSWORD
FGetSize
(FILES *
fsPtr
)
Category(ies):
Files
Description:
Return the number of bytes currently stored in an opened FILE.
Inputs:
fsPtr
Pointer to FILES structure previously opened with
FOpen
.
Outputs:
Number of bytes in the opened file.
Assumptions:
The FILES structure pointed to by
fsPtr
must have been previously opened
with
FOpen
(either read or write mode).
Side Effects:
None
Availability:
On AMS 2.00 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: FOpen, FSetSize
Example:
FILES f1;
FSWORD x;
if (FS_OK == FOpen("f1", &f1, FM_WRITE, "DAT")) {
FWrite( "START", 5, &f1 );
x = FGetSize( &f1 ); /* x == 5 */
FWrite( "123", 3, &f1 );
x = FGetSize( &f1 ); /* x == 8 */
FSetSize( &f1, 7 ); /* truncate file */
x = FGetSize( &f1 ); /* x == 7 */
FClose(&f1);
}

Table of Contents

Other manuals for Texas Instruments TI-89

Related product manuals