Print2Dexpr - Texas Instruments TI-89 Developer's Manual

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

Advertisement

444

Print2DExpr

Declaration:
void Print2DExpr (EStackIndex i , WINDOW * Win , SWORD xOffset ,
SWORD yOffset )
Category(ies):
Display
Description:
Print the 2D output from Parse2DExpr or Parse2DMultiExpr to a window
(with defined offsets).
i
Inputs:
Win
xOffset , yOffset — x and y offsets of where to start drawing in the window.
Outputs:
Draws to Win.
Assumptions:
Assumes the input came from Parse2DExpr or Parse2DMultiExpr.
Side Effects:
Throws an ILLEGAL_TAG_ERROR if any invalid tags in the input.
Availability:
All versions of the TI-89 / TI-92 Plus.
TI-89 / TI-92 Plus
Differences:
None
See Also:
Parse2DMultiExpr, Parse2DExpr
Example:
See WinScrollH for an example of a scrollable 2D viewer.
WORD Width, Depth, Height, Key;
short y;
EStackIndex origEStack, i2D;
BYTE Buf[128];
WinClr( &appW );
y = 0;
/* appW setup when app started */
strcpy( (char *) Buf, "((1-X)^2/(1+X))" );
origEStack = top_estack;
TRY
push_quantum( END_OF_SEGMENT_TAG );
push_parse_text( Buf );
i2D = Parse2DExpr( top_estack, 1 );
Parms2D( i2D, &Width, &Depth, &Height );
y += Height + 2;
Print2DExpr( i2D, &appW, 0, y );
GKeyIn( NULL, 0 );
y += Depth;
/* update y cursor by depth */
ONERR
top_estack = origEStack;
PASS;
/* and pass error on up the chain */
ENDTRY
top_estack = origEStack;
TI-89 / TI-92 Plus Developer Guide
— EStackIndex of 2D expression (output of
Parse2DExpr or Parse2DMultiExpr).
— WINDOW structure to write to.
/* save top of
/* mark end of expression */
/* tokenized text */
/* convert to display rpn */
/* update y cursor by height of expression */
/* print to our window */
/* wait */
/* restore estack if error */
/* restore estack */
Not for Distribution
Appendix A: System Routines — Display
/* Buf could be input by user */
estack */
/* get parameters of display rpn */
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