EasyManua.ls Logo

Texas Instruments TI-89 - Estack_To_Short

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...
522
Appendix A: System Routines — EStack Utilities
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
estack_to_short
Declaration:
short
estack_to_short
(EStackIndex
i
, signed short *
result
)
Category(ies):
EStack Utilities, EStack Arithmetic
Description:
Converts a tagged whole number to a C signed short.
Inputs:
i
Index of the tag of a tagged integer or tagged float whole
number.
result
Points to a signed short for storing the short result.
Outputs:
If successful, returns 1 after storing the signed short value in
result
. If the
argument is a valid type having magnitude too large for a signed short,
returns 0 after storing the correctly signed
L
32768 or 32767 in
result
. If the
argument is invalid, returns
L
1 after storing 0 in
result
.
Assumptions:
None
Side Effects:
None
Availability:
On AMS 1.05 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: estack_to_ushort, estack_to_float, estack_number_to_Float
Example:
push_quantum_as_nonnegative_int (5u);
estack_to_short(top_estack, &ans); /* Stores 5 in ans then returns 1 */
push_ushort_to_integer (65535);
estack_to_short(top_estack, &ans); /* Stores 32767 in ans then returns 0 */
estack_to_short(FloatPiIndex, &ans); /* Stores 0 in ans then returns –1 */

Table of Contents

Other manuals for Texas Instruments TI-89

Related product manuals