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 #1128 background imageLoading...
Page #1128 background image
1086
Appendix A: System Routines — Token Operations
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
get_key_ptr
(continued)
Example:
/* The system only uses get_key_ptr after user variables, arbitrary constants, and
numbers have been processed. If i is the EStackIndex of an expression, and kp is
an unsigned char pointer, then the following is an appropriate approach. */
Quantum q, r;
q = ESTACK (i); /* get the topmost tag */
r = 0; /* assume the topmost tag is a primary tag */
if (IS_USER_VAR (q)) /* check for user variables */
{
. . . /* code to handle user variables */
}
else if (IS_ARB_TAG (q)) /* check for arbitrary constants */
{
. . . /* code to handle arbitrary constants, @1, @n1, etc. */
}
else if (IS_NUMBER_TAG (q)) /* check for numbers */
{
. . . /* code to handle numbers */
}
else if (IS_DOUBLE_TAG (q)) /* check for tokens that require two values */
{ /* SYSVAR_TAG, SECONDARY_TAG, COMMAND_TAG */
r = ESTACK (i - 1);
}
kp = get_key_ptr (q, r); /* get pointer to catalog string */
.
.
.
/* -------------------------------------------------------------------- */
/* if q = SIN_TAG and r = 0, then get_key_ptr (q, r) returns a pointer */
/* to the string “sin(“. */
/* */
/* if q = SYSVAR_TAG and r = SV_XMIN, then get_key_ptr (q, r) returns a */
/* pointer to the string “xmin”. */
/* */
/* if q = SECONDARY_TAG and r = GETKEY_TAG, then get_key_ptr (q, r) */
/* returns a pointer to the string “getkey()”. */
/* -------------------------------------------------------------------- */

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