592
Appendix A: System Routines — Graphing
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
CptIndep
(continued)
Example:
This example creates a list of the independent values for the current graph
mode from min to max and step size as determined by the current Window
variables. The result is stored in a list called lst1.
Access_AMS_Global_Variables;
USHORT curinc = 0;
BCD16 xValue, *rangePtr;
BYTE lst1[] = {0,'l','s','t','1',0};
EStackIndex saveTop = top_estack;
switch( gr_active->graph_mode) {
case GR_PAR: rangePtr = &((gr_active->rngp)[GR_TMIN]); break;
case GR_POL: rangePtr = &((gr_active->rngp)[GR_THETMIN]); break;
default: ER_throw( ER_GRAPH_MODE );
}
push_quantum( END_TAG );
while(CptIndep( rangePtr, &xValue, curinc )) {
curinc++;
push_Float( xValue );
}
push_reversed_tail( top_estack );
push_quantum( LIST_TAG );
VarStore( lst1+5, STOF_ESI, 0, top_estack );
top_estack = saveTop;