Reference Guide

Full Command and Function Reference 3-273
Input/Output:
Level 1/Argument 1 Level 1/Item 1
x
0
x
key
–1
x
key
Example 1: This program:
« "Press [1] to addPress any other key to subtract"
1 DISP 0 WAIT IF 92.1 SAME THEN + ELSE - END »
displays a prompting message and halts program execution until a key is pressed. If the 1 key
(location 92.1) is pressed, two numbers on the stack are added. If any other key is pressed, two
numbers on the stack are subtracted.
Example 2: This program:
« { ADD { } { } { } { } SUB } MENU
"Press [ADD] to addPress [SUB] to subtract"
1 DISP -1 WAIT IF 11.1 SAME THEN + ELSE - END »
builds a custom menu with labels
ADD
and
SUB
and a prompting message. Executing
-1 WAIT
displays the custom menu (note that it’s not active) and suspends execution for keyboard input. If
the
ADD
menu key (location 11.1) is pressed, two numbers on the stack are added. If any other
key is pressed, two numbers on the stack are subtracted.
See also: KEY
WHILE
Type: Command Operation
Description: WHILE Indefinite Loop Structure Command: Starts the WHILE … REPEAT … END
indefinite loop structure.
WHILE … REPEAT … END repeatedly evaluates a test and executes a loop clause if the test is
true. Since the test clause occurs before the loop-clause, the loop clause is never executed if the
test is initially false. The syntax is this:
WHILE test-clause REPEAT loop-clause END
The test clause is executed and must return a test result to the stack. REPEAT takes the value
from the stack. If the value is not zero, execution continues with the loop clause; otherwise,
execution resumes following END.
Access:
BRANCH WHILE
( °is the left-shift of the Nkey).
Input/Output:
Level 1/Argument 1 Level 1/Item 1
WHILE
REPEAT
T/F
END
See also: DO, END, REPEAT
WIREFRAME
Type: Command
Description: WIREFRAME Plot Type Command: Sets the plot type to WIREFRAME.
When the plot type is set to WIREFRAME, the DRAW command plots a perspective view of the
graph of a scalar function of two variables. WIREFRAME requires values in the reserved
variables EQ, VPAR, and PPAR.