Texas Instruments TI89 Developer Guide - Page 204
Tags, a + b
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 204 highlights
162 Chapter 15: Expressions and The Expression Stack 15.2.1. 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/d a*(b+c)/d x*y^n-z a b * c + a b c + * a b * c d / + a b c + * d / x n y ^ * z - Table 15.1: Examples of Polish Representations 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 TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/204.png)