Using Input - HP 48gII Advanced User's Reference Manual

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

Advertisement

Using INPUT ... ENTER for Input
INPUT lets you use the stack area for prompting, lets you supply default input, and prevents the user from using
normal stack operations or altering data on the stack.
To enter INPUT in a program:
1. Enter a string (with "" delimiters) to be displayed as a prompt at the top of the stack area.
2. Enter a string or list (with delimiters) that specifies the command-line content and behavior — see below.
3. Enter the INPUT command (PRG IN menu).
4. Enter OBJ" (PRG TYPE menu) or other command that processes the input as a string object.
« ... "prompt-string" "command-line" INPUT OBJ ... »
or
« ... "prompt-string" {command-line} INPUT OBJ ... »
INPUT, in its simplest form, takes two strings as arguments — see the list of additional options following.
INPUT blanks the stack area, displays the contents of the level-2 string at the top of the stack area, and displays
the contents of the level-1 string in the command line. It then activates Program-entry mode, puts the insert
cursor after the string in the command line, and suspends execution.
When execution resumes, the input is returned to level 1 as a string object, called the result string.
To respond to INPUT while running a program:
1. Enter your input. (You can't execute commands — they're simply echoed in the command line.)
2. Optional: To clear the command line and start over, press −.
3. Press `.
If you execute this program segment
« "Variable name?" ":VAR:" INPUT »
the display looks like this:
The following program, VSPH, calculates the volume of a sphere. VSPH prompts for the radius of the sphere,
then cubes it and multiplies by
entry mode when program execution pauses for data entry.
1-38 RPL Programming
4
π
/
. VSPH executes INPUT to prompt for the radius. INPUT sets Program-
3

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

49g+

Table of Contents