EasyManua.ls Logo

Texas Instruments TI-89 - Getvalue

Texas Instruments TI-89
1398 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
524
Appendix A: System Routines — EStack Utilities
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
GetValue
Declaration:
long
GetValue
(EStackIndex
indx
, long
rLow
, long
rHigh
)
Category(ies):
EStack Utilities, EStack Arithmetic
Description:
Get a value from the estack in the range
rLow
to
rHigh
. Throw an
ER_DOMAIN error if not in range. Throw an ER_DATATYPE error if the
estack does not contain an integer or a number that can be converted to an
integer.
Inputs:
indx
Indexes the location of the estack to retrieve the value from.
rLow
The low range of accepted values.
rHigh
The high range of accepted values.
Outputs:
Value in the range
rLow
to
rHigh
.
Assumptions:
None
Side Effects:
May throw an ER_DOMAIN or ER_DATATYPE error.
Availability:
On AMS 1.05 and higher.
TI-89 / TI-92 Plus
Differences:
None
See Also: estack_to_short, estack_to_ushort
Example:
This example is used by the graphing commands in TI
-
BASIC to get the
user supplied screen attribute value. It returns the attribute value after
mapping it from a user supplied integer in the range -1 to +1.
/* Get a valid attribute value (0,1,-1) and return its corresponding
screen attribute (A_REVERSE, A_NORMAL, A_XOR).
*/
short GetAttr( EStackIndex i )
{ Access_AMS_Global_Variables;
SWORD RetInt;
RetInt = GetValue( i, -1, 1 );
if (RetInt == -1)
return A_XOR;
else if (RetInt == 0)
return A_REVERSE;
else
return A_NORMAL;
}

Table of Contents

Other manuals for Texas Instruments TI-89

Related product manuals