E' . .!AL
Evaluate the outcome. In this example, EVAL
has no effect because the outcome is a string. In
a more realistic example, the outcome might be
a program (possibly stored in a variable), so
EVAL would be needed.
Enable the normal stack display.
When this sequence is executed, the user sees the option messages.
[A] for- Apple
[B] for- Banana
[C] for- Cher-r-y
If the user presses a key other than
a beep sounds and
the error message appears for 1 second.
Then the option messages reappear. When the user presses
is returned to
By modifying the list of possible outcomes, the option messages, and
the list of defined keys, you can make this sequence more significant
than putting a string on .the stack. More generally, by using local vari-
ables and putting this sequence inside a local-variable structure, you
can make the following program.
27: Interactive Programs