To include INPUT options:

Use a list (with {} delimiters) as the command-line argument for INPUT. The list can contain one more of the following:

Command-line string (with "" delimiters).

Cursor position as a real number or as a list containing two real numbers.

Operating options ALG, Œ, or V.

In its general form, the level 1 argument for INPUT is a list that specifies the content and interpretation of the command line. The list can contain one or more of the following parameters in any order:

{"command-line"cursor-position operating-options }

Command-line Specifies the content of the command line when the program pauses. Embedded newline characters produce multiple lines in the display. (If not included, the command line is blank.)

Cursor-positionSpecifies the position of the cursor in the command line and its type. (If not included, an insert cursor is at the end of the command line.)

A real number n specifies the nth character in the first row (line) of the command line. Zero specifies the end of the command-line string. A positive number specifies the insert cursor — a negative number specifies the replace cursor.

A list {row character} specifies the row and character position. Row 1 is the first row (line) of the command line. Characters count from

the left end of each row — character 0 specifies the end of the row. A positive row number specifies the insert cursor — a negative row number specifies the replace cursor.

operating-optionsSpecify the input setup and processing using zero or more of these unquoted names:

ALG activates Algebraic/Program-entry mode (for algebraic syntax). (If not included, Program-entry mode is active.)

Œ (~…A) specifies alpha lock. (If not included, alpha is inactive.)

V verifies whether the result string (without the "" delimiters) is a valid object or sequence of objects. If the result string isn’t valid, INPUT displays the Invalid Syntax message and prompts again for data. (if not included, syntax isn’t checked.)

To design the command-line string for INPUT:

For simple input, use a string that produces a valid object:

Use an empty string

Use a :label : tag.

Use a @ text @ comment.

For special input, use a string that produces a recognizable pattern.

After the user enters input in the command line and presses `to resume execution, the contents of the command line are returned to level 1 as the result string. The result string normally contains the original command- line string, too. If you design the command-line string carefully, you can ease the process of extracting the input data.

1-42 RPL Programming