1142
Appendix A: System Routines — Variables
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
push_assignment
Declaration:
void
push_assignment
(EStackIndex
i
)
Category(ies):
Variables
Description:
Assigns a value to a symbol in the symbol table. It is the primary
processing routine for the store operator and the Define command.
Inputs:
i
— EStackIndex of an assignment pair. The topmost expression is the
symbol. The next expression below the symbol is the value to be
stored. (The value can be specified in internal or external tokenized
form.)
Outputs:
The external tokenized form of the value is stored as the value of the
symbol and is pushed on the top of the estack.
Assumptions:
None
Side Effects:
May expand expression stack or cause heap compression. May throw an
error associated with simplification of the value or the specified symbol
name.
Availability:
On AMS 2.00 and higher.
TI-89 / TI-92 Plus
Differences:
None
See Also:
None
Example:
/* The QR command performs the QR decomposition of a matrix. The command is given a
matrix, a symbol name in which to store the Q matrix, and a symbol name to store
the R matrix. Toward the end of the process the QR command has built the Q and R
matrices on the expression stack with the R matrix top-most and the Q matrix below
it. The estack indexes q and r reference these matrices. The estack indexes qsym
and rsym reference the symbol names. The estack index old_top references the top of
the stack when the QR command received control. The QR command takes the following
steps to store the matrices to the appropriate symbols.
*/
.
.
.
push_expression (rsym); /* push the symbol name above the R matrix */
push_assignment (top_estack); /* store the R matrix into the symbol */
top_estack = q; /* throw away the stack copy of the R matrix and symbol name */
push_expression (qsym); /* push the symbol name above the Q matrix */
push_assignment (top_estack); /* store the Q matrix into the symbol */
top_estack = old_top; /* restore original stack position before return */
.
.
.