User And Application Defined Functions And Programs; External Versus Internal Tokenized Polish; Table 15.11: Command Tag Examples - Texas Instruments TI-89 Developer's Manual

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

170
Expression
ClrHome
DelVar x
Disp a, b
15.2.10.

User and Application Defined Functions and Programs

Both calculator users and application developers can provide new functions and
programs. References to them are all represented in the same way. The topmost
identifying tag is USER_FUN_TAG. Next comes a variable name representation
that specifies the name of the function or program. Finally comes a tail of
arguments. Thus, if a user or application defines a function f(x), then the function
reference f(0) is represented by END_TAG 0 NONNEGATIVE_INTEGER_TAG
F_VAR_TAG USER_FUN_TAG. If a user or application defines a program
pa(x, y, z), then the program reference pa( c, "dd", L1) is represented by
END_TAG 1 1 NEGATIVE_INTEGER_TAG 0 d d 0 STR_DATA_TAG
C_VAR_TAG VAR_TAG p a VAR_TAG USER_FUN_TAG.
15.3.

External Versus Internal Tokenized Polish

The system actually uses two slightly different tokenized forms. The tokenizer
produces a form called external tokenized form, which has been described in the
previous sections. This form has individual tags for representing all of the
operators, functions, and commands provided by the system. This form allows for
all the different ways that expressions may be represented including multiple
representations of the same expression. For example, a / b and a * (b ^ L1) are
different representations of the same expression.
The simplifier produces a form called internal tokenized form. The two primary
reasons for this second form are expression recognition and efficiency of
implementation. The simplifier must be able to recognize when expressions are
similar or the same. Thus, expressions are translated into a standard form using
fewer tags, allowing the simplifier to more easily recognize expressions that
combine or cancel. Fewer tags and a standardized form allow the implementation
of the simplifier to be smaller and faster.
The following tags only occur in external tokenized form. Simplification replaces
these tags with a standard internal form.
TI-89 / TI-92 Plus Developer Guide
Chapter 15: Expressions and The Expression Stack
Representation
CLRHOME_TAG COMMAND_TAG
X_VAR_TAG DELVAR_TAG COMMAND_TAG
END_TAG B_VAR_TAG A_VAR_TAG DISP_TAG
COMMAND_TAG

Table 15.11: Command Tag Examples

Not for Distribution
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents