Reference Guide

Full Command and Function Reference 3-35
Example: Find the Cholesky factorization of:
1 1
1 5
Command:
CHOLESKY
1 1
1 5
Result:
1
1
0
2
CHOOSE
Type: Command
Description: Create User-Defined Choose Box Command: Creates a user-defined choose box.
CHOOSE creates a standard single-choice choose box based on the following specifications:
Variable Function
prompt A message that appears at the top of choose box. If “prompt” is an
empty string (“”), no message is displayed.
{c
1
c
n
} Definitions that appear within the choose box. A choice definition
(c
x
) can have two formats.
obj, any object
{ obj
display
obj
result
}, the object to be displayed followed by the result
returned to the stack if that object is selected.
n
pos
The position number of an item definition. This item is highlighted
when the choose box appears. If n
pos
= 0, no item is highlighted, and
the choose box can be used to view items only.
If you choose an item from the choose box and press
OK
, CHOOSE returns the result (or the
object itself if no result is specified) to level 2 and 1 to level 1. If you press , CHOOSE
returns 0. Also, if n
pos
= 0, CHOOSE returns 0.
Access: !°L
IN CHOOSE
( °is the left-shift of the Nkey).
Input/Output:
L3/A1 L2/A2 L1/A3 L2/I1 L1/I2
“prompt”
{ c
1
... c
n
}
n
pos
obj or result
“1”
“prompt”
{ c
1
... c
n
}
n
pos
“0”
L = Level; A = Argument; I = item
Example: CHOOSE with the following three lines as input would produce a three-line choose box:
"Select a Program"
{ { "Pie Chart" «PIE» } { "Inverse Function" «ROOTR» }
{ "Animate Taylor" «TSA» } }
1
See also: INFORM, NOVAL
CHR
Type: Command
Description: Character Command: Returns a string representing the character corresponding to the character
code n.