To include INPUT options:

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

Commandline 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:

{ "commandline " cursorposition operatingoptions }

Commandline

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.)

 

 

Cursorposition

Specifies 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 commandline st ring. 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.

 

 

operatingoptions

Specify the input setup and processing using zero or more of these unquoted names:

 

ALG activates Algebraic/Programentry mode (for algebr aic syntax). (If not

 

included, Programentry 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 commandline 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 commandline st ring carefully, you can ease the process of extracting the input data.

142 RPL Programming

Page 66
Image 66
HP 50g Graphing To include Input options, Commandline cursorposition operatingoptions, Cursorposition, Operatingoptions