Texas Instruments TI89 Developer Guide - Page 1073
SymDel, VarStore, FOpen, Symbol Table low-level
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 1073 highlights
Appendix A: System Routines - Symbol Table Utilities 1031 SymAdd Declaration: Category(ies): Description: Inputs: Outputs: Assumptions: Side Effects: HSYM SymAdd (const BYTE * SymName) Symbol Table (low-level) Add the given symbol name to the symbol table and return an HSYM to the new symbol table entry. If the symbol already exists and it has a value, that value will be deleted (unless it is a folder name, then NULL is returned). SymName - Pointer to tokenized symbol name. HSYM of newly created symbol or zero if not enough memory. May throw an ER_LOCKED error if the symbol already exists and is locked. VarStore or the file system are normally used to create symbols. May cause heap compression. NOTE: This routine does not check for reserved symbols and so caution must be used when using this routine. Availability: All versions of the TI-89 / TI-92 Plus. TI-89 / TI-92 Plus Differences: None See Also: SymDel, VarStore, FOpen Example: Access_AMS_Global_Variables; BYTE foldName[] = {0,'t','m','p','1',0}; BYTE symName[] = {0,'s','y','m','1',0}; BCD16 fNum = 1.234; HSYM hsym1; if (FolderFind(foldName+5) == FL_NOTFOUND) { if( !FolderAdd( foldName+5 )) ER_throw( ER_MEMORY ); } FolderCur( foldName+ 5, TRUE ); if (hsym1 = SymAdd( symName+5 )) { push_Float( fNum ); VarStore( symName+5, STOF_ESI, 0, top_estack ); /* give it a value */ /* HSYMs better match! */ if (hsym1 != SymFind(symName+5)) ER_THROW( FIRST_INTERNAL_ERR ); handleVarLinkKey(SDT_ALL); /* show new symbol */ /* hsym1 is now invalid since user can add/delete variables in VAR-LINK */ if (!SymDel( symName+5 )) DlgNotice( NULL, "You deleted tmp1\\sym1 in VAR-LINK" ); } TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/1073.png)