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 #204 background imageLoading...
Page #204 background image
162
Chapter 15: Expressions and The Expression Stack
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
This representation has two primary advantages — space efficiency and
relocatability. No internal pointers are necessary to manipulate or maintain the
structure. Since the hierarchical ordering of operations is implicit in the
representation, delimiters such as parentheses are not needed to enforce the
ordering.
Tokenized Polish form places the operands deepest in the representation and
the operator higher or on top of the operands. For example, the simple sum
a + b
would produce the form:
+ (highest address)
b
a
(lowest address)
This representation is also written
a b
+
with the lowest address on the left and highest address on the right. It is
important to remember that this form is always interpreted from high address to
low address. Evaluation always encounters the operator before its operands.
This method is different from reverse Polish form, which encounters the
operands before the operator.
Since each operand can also be an expression, any level of complexity can be
represented. Here are a few more examples of expressions and their Polish
representations. Remember that the tokenizer produces the Polish
representation by reading the text expression from left to right, but thereafter, the
system interprets the Polish representation from right to left (or high address to
low).
Expression Polish representation
a*b+c a b * c +
a*(b+c) a b c + *
a*b+c/d a b * c d / +
a*(b+c)/d a b c + * d /
x*y^n-z x n y ^ * z -
Table 15.1: Examples of Polish Representations
15.2.1. Tags
Tags are single Quantum values that are used in the tokenized form to represent
most elements of the structure and also are used to delimit those elements
whose representation requires more than a single Quantum. For example, the
single letter variables a through z, the symbolic constants
π
and
e
, the Boolean

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