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 #175 background imageLoading...
Page #175 background image
Chapter 13: Memory Management
133
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
There is no separate mode to open a file for both reading and writing. However, if
a file is opened in FM_APPEND mode the contents of the file are not erased. All
locations in the file can either be read from or written to (random access).
The file routines are:
FClose
Close a file, this is required for files opened in write
mode.
FCreate
Create an empty file.
FDelete
Delete a file.
FEof
Return TRUE if a file is at the End of File mark.
FFindFirst, FFindNext
Used to search all files for a specific file type.
FGetC
Return a byte from an open file.
FGetPos
Return the current file position.
FGetSize
Return the number of bytes stored in an opened file.
FOpen
Open a file for reading, writing or both.
FPutC
Write a byte to a file opened in write mode.
FRead
Read multiple bytes from a file.
FSetBufSize
Set the size of the write buffer for an opened file.
FSetPos
Set the position of the next read or write for an opened
file.
FSetSize
Truncate the size of a file opened in write mode.
FSetVer
Change the version number of an opened file.
FStatus
Return the status of an opened file.
FType
Return the file type (description field) of a file.
FWrite
Write multiple bytes to an opened file.
13.2.1. Opening Multiple Files for WRITE Mode
This section is only relevant if you plan on opening multiple files simultaneously
in write mode. It requires some understanding of variables, specifically HSYMs
which are explained in the next section. The FILES structure contains an HSYM
of the opened file. HSYMs can become invalid whenever a new symbol table
entry is added or a previous one is removed. In the FILE system the problem of
HSYMs becoming invalid is only a problem if multiple files must be opened at the
same time in WRITE or APPEND mode. Since the file system stores the HSYM
of all opened variables in the FILES structure (this is needed for when the file is
closed), creating a new file (which is just a symbol) with an existing file opened in
WRITE mode may invalidate the previous file’s HSYM. To get around this
problem in the file system just use
FCreate
to create multiple files that must be
opened simultaneously in WRITE mode before they are opened. This will insure

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