Using Inform And Choose For Input - HP 48gII Advanced User's Reference Manual

Graphing calculator
Hide thumbs Also See for 48gII:
Table of Contents

Advertisement

10 ˜20
Continue program execution.
`
Example:
The following program executes INPUT to prompt for a social security number, then extracts two
strings: the first three digits and last four digits. The level 1 argument for INPUT specifies:
A command-line string with dashes.
!
The replace cursor positioned at the start of the prompt string ( –1). This lets the user "fill in" the command
!
line string, using ™to skip over the dashes in the pattern.
By default, no verification of object syntax — the dashes make the content invalid as objects
!
Program:
«
"Key in S.S. #"
{ "
INPUT
DUP 1 3 SUB
SWAP
8 11 SUB
»
O 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.
1-42 RPL Programming
Level 1
"
"
- -
" -1}
Level 2
Level 1
"last four digits"
"first three digits"
Comments:
Prompt string.
Command-line string (3 spaces
before the first -, 2 spaces
between, and 4 spaces after the
last -).
Suspends the program for input.
Copies the result string, then
extracts the first three and last
four digits in string form.
Stores the program in SSEC.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

49g+

Table of Contents