Download  Print this page

Procedure-class Objects; Evaluation Of Programs - HP -28S Manual

Advanced scientific calculator.
Hide thumbs

Advertisement

W
Note
Do not create a variable whose value is its own name,
such as a variable named X that contains the name
'X'.
Evaluating such a variable causes an endless loop. To
halt an endless loop, you must perform a system halt
(@ill [!]), which also clears the stack.
Similarly, do not create variables that reference one another in a circu-
lar definition. Evaluating a variable included in a circular definition
also causes an endless loop.
Procedure-Class Objects
Generally, the "value" of a procedure is the result of whatever process
it defines. Programs are the most general procedure-class objects, so
they're described first, followed by algebraics.
Evaluation of Programs
A program is a sequence of objects and commands. This manual uses
the terms "evaluate a program" and "execute a program" inter-
changably. In general, evaluating a program takes the program's
contents in order, putting each object on the stack and executing each
command. There are two additional points to remember:
• Unquoted names are evaluated, while quoted names go on the
stack. Names are quoted expressly to delay evaluation, as discussed
on page 57 .
• Program structures are executed according to their own rules. In
part 1 you wrote several user functions, which contain a
local-
variable structure. Program structures are described in chapter 26.
23: Evaluation
201

Advertisement

Table of Contents

   Also See for HP HP-28S

   Related Manuals for HP HP-28S

Comments to this Manuals

Symbols: 0
Latest comments: