Evaluation Of Local Names; Evaluation Of Global Names - HP -28S Manual

Advanced scientific calculator
Hide thumbs Also See for HP-28S:
Table of Contents

Advertisement

Evaluation of Local Names
As described in chapter 19, the use of local variables simplifies stack
manipulations. The purpose of local variables is (1) to remove the
variable's contents from the stack so it's out of the way and (2) to
return a copy of the variable's contents whenever you need it. Conse-
quently, evaluating a local name always returns the contents of the
corresponding local variable to the stack.
Evaluation of Global Names
In general, evaluating a global name causes evaluation of the contents
of the corresponding global variable. In other words, evaluating a
global name has the same effect as evaluating the object it represents.
There are two exceptions to the general rule:
• If no variable exists with the specified name, the name is returned
to the stack. An undefined name used as a variable is called a
for-
mal variable.
• If the contents of the specified variable is an algebraic, the algebraic
is
not evaluated.
The calculator avoids evaluation of these objects so
you can continue symbolic calculations. If you do want evaluation,
execute the command EVAL with the algebraic in level 1. (To eval-
uate an algebraic repeatedly until it produces a numerical result,
execute .... NUM.)
If the variable contains a data-class object, evaluating the variable's
name is equivalent to simply recalling the variable's contents. How-
ever, evaluating a variable's name can lead to a long chain of
evaluations. For example, if a variable contains a name, and that
name is the name of a second variable, and the second variable con-
tains a name, and that name is the name of a third variable, then
evaluating the name of the first variable ultimately causes evaluation
of contents of the third variable.
200
23: Evaluation
I

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents