HP -28S Manual page 237

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

Advertisement

displays an error message if the key is undefined. In the listing below,
the indentation marks the outer structure, the clauses, the inner struc-
tures, and their clauses.
Sequence
"Apple"
"Banana"
II
Cher
t-I~
II
DO
CLLCD
" [AJ
felt"
Applre"
2 DISP
" [B J
f
Ot"
B.:.nan.:."
" [CJ fot"
Chet"t"y"
DO UNTIL KEY END
UtHIL
Comments
This list contains the possible out-
comes.
It
remains on the stack until
the following DO ... UNTIL ... END
structure returns
1,
2, or 3, indicating
the user's choice.
Begin the outer loop clause. This
clause displays option messages,
which tell the user what the choices
are, and gets a response from the user.
Clear the display.
The option message for line 1.
Display the message.
The option message for line 2.
Display the message.
The option message for line 3.
Display the message.
The option message for line 4.
Display the message.
This inner indefinite loop repeats until
the user presses a key. The command
KEY returns
~3
if no key was pressed,
or a string (representing the key) and
1 if a key was pressed. When the loop
ends, the string is left on the stack.
Begin the outer test clause. This clause
checks whether the key pressed was a
defined key.
236
27: Interactive Progran ... s
I

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents