HP 48gII Graphing, 50g Graphing manual Using Inform and Choose for Input, To set up an input form

Models: 50g Graphing 48gII Graphing

1 693
Download 693 pages 23.18 Kb
Page 69
Image 69

Program:

 

Comments:

 

 

 

«

 

 

"Key in S.S. #"

Prompt string.

{ "

" 1 }

Commandline string (3 spaces

 

 

before the first , 2 spaces

 

 

between, and 4 spaces after the

 

 

last ).

INPUT

 

Suspends the program for input.

DUP 1 3 SUB

 

Copies the result string, then

SWAP

 

extracts the first three and last

8 11 SUB

 

four digits in string form.

»

 

 

 

 

 

O SSEC

 

Stores the program in SSEC.

 

 

 

Using INFORM and CHOOSE for Input

You can use input forms (dialog boxes), and choose boxes for program input. Program that contain input forms or choose boxes wait until you acknowledge them (%OK% or ) before they continue execution.

If OK is pressed, CHOOSE returns the selected item (or its designated returned value) to level 2 and a 1 to level 1. INFORM returns a list of field values to level 2 and 1 to level 1.

Both the INFORM and CHOOSE commands return 0 if CANCEL is pressed.

To set up an input form:

1.Enter a title string for the input for the input form (use ).

2.Enter a list of field specifications.

3.Enter a list of format options.

4.Enter a list of reset values (values that appear when RESET is pressed).

5.Enter a list of default values.

6.Execute the INFORM command.

Example: Enter a title "FIRST ONE" `. Specify a field { "Name:" } `.

Enter format options (one column, tabs stop width five) { 1 5 } `.

Enter reset value for the field { "THERESA" } `. Enter default value for the field { "WENDY" } `. Execute INFORM (!°L%IN% %INFOR%).

The screen on the left appears. Press L%RESET% %OK% and the screen on the right appears.

RPL Programming 145

Page 69
Image 69
HP 48gII Graphing, 50g Graphing manual Using Inform and Choose for Input, To set up an input form