Makehsym - Texas Instruments TI-89 Developer's Manual

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

Advertisement

1024

MakeHsym

Declaration:
HSYM MakeHsym (HANDLE fHandle , SYM_ENTRY * SymEntry )
Category(ies):
Symbol Table (low-level)
Description:
Given a handle to a folder and a SYM_ENTRY pointer to a symbol in that
folder create an HSYM from both values. An HSYM is basically a
combination of the folder's handle and the offset of a symbol into that
folder. HSYMs are valid until a symbol is added or removed from the folder
they belong to. Dereferencing an HSYM with DerefSym produces a direct
pointer to the symbol table which is valid until heap compression is done.
fHandle
Inputs:
SymEntry — SYM_ENTRY pointer to symbol.
Outputs:
HSYM representing the given symbol.
Assumptions:
None
Side Effects:
HSYMs are valid until a symbol is added or removed from the folder they
belong to.
Availability:
All versions of the TI-89 / TI-92 Plus.
TI-89 / TI-92 Plus
Differences:
None
See Also:
DerefSym
Example:
In this example, SymPtr (a SYM_ENTRY pointer to a specific symbol) must
be maintained. Heap compression would cause the pointer to be invalid
since it is a direct pointer into memory. So the SymPtr is converted to an
HSYM with MakeHsym (along with the HANDLE of the folder that the
symbol belongs to). After the code that may cause heap compression is
executed, the HSYM is converted back into a SYM_ENTRY pointer with
DerefSym.
HANDLE folderHandle;
SYM_ENTRY *SymPtr;
HSYM hsym;
hsym = MakeHsym( folderHandle, SymPtr );
. . . Do something that may cause heap compression . . .
SymPtr = DerefSym( hsym );
TI-89 / TI-92 Plus Developer Guide
Appendix A: System Routines — Symbol Table Utilities
— Handle of folder.
Not for Distribution
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