Texas Instruments TI-89 Developer's Manual page 1092

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

Advertisement

1050
VarStore
(continued)
Example:
/* This example routine stores to the variable 'var' the region defined by 'wr'
for the WINDOW pointed to by 'winPtr'.
*/
HSYM StoPic( WINDOW *winPtr, EStackIndex var, WIN_RECT *wr )
{
WORD SaveSize;
HSYM hsym;
void *Ptr;
EStackIndex varI;
BOOL oldFlag;
SYM_ENTRY *symPtr;
if ((SaveSize = WinBitmapSize( winPtr, wr )) > 0) {
if (hsym = VarStore(var, PIC_VAR_TAG, SaveSize+1)) {
symPtr = DerefSym( hsym );
symPtr->Version = TV_TI_92;
Ptr = HeapDeref(symPtr->hVal);
(*(WORD *) Ptr) = SaveSize + 1;
Ptr = (BYTE *) Ptr + 2;
(*((BYTE *) Ptr + SaveSize)) = PIC_VAR_TAG;
oldFlag = WinDupStat( winPtr, FALSE );
WinBitmapGet( winPtr, wr, (BITMAP *) Ptr );
WinDupStat( winPtr, oldFlag );
}
else
ER_THROW( ER_RESERVED );
}
else
ER_THROW( ER_DIMENSION );
return( hsym );
}
TI-89 / TI-92 Plus Developer Guide
Appendix A: System Routines — Symbol Table Utilities
/* PICs are same across all versions */
/* store size of picture */
/* skip size */
/* restore DupStat */
Not for Distribution
/* store tag */
/* get backup image if have one */
/* get image data */
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