EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Developer's Guide

Texas Instruments TI-89
1398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #565 background imageLoading...
Page #565 background image
Appendix A: System Routines — EStack Utilities
523
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
estack_to_ushort
Declaration:
short
estack_to_ushort
(EStackIndex
i
, unsigned short *
result
)
Category(ies):
EStack Utilities, EStack Arithmetic
Description:
Converts a tagged whole number to a C unsigned short.
Inputs:
i
Index of the tag of a tagged integer or tagged float whole
number.
result
Points to an unsigned short for return value.
Outputs:
If successful, returns 1 and unsigned short via
result
. If the argument is a
valid type, but too large for unsigned short, returns 0 and stores 65535 in
result
. If the argument is invalid, returns
L
1 and stores 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_short
Example:
void push_char (EStackIndex i)
/* i indexes a tagged whole number from 0 through 255 or an aggregate thereof.
Pushes the corresponding string or aggregate thereof, except char(0) -> "".
*/
{ unsigned short c;
if (IS_NUMBER_TAG(ESTACK(i)) && is_whole_number(i) &&
1 == estack_to_ushort(i, &c) && c < 256 )
{ push_quantum (0);
if (c)
push_quantum ((Quantum) c);
push_quantum (0u);
push_quantum (STR_DATA_TAG);
}
else if (LIST_TAG == ESTACK(i))
{ map_tail (push_char, i-1);
push_quantum (LIST_TAG);
}
else ER_THROW (ER_DOMAIN);
}

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals