Labeling And Displaying Output As Strings; Pausing To Display Output - HP 48gII Advanced User's Reference Manual

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

Advertisement

Labeling and Displaying Output as Strings

To label and display a result as a string:
1. Put the output object on the stack.
2. Enter the "STR command (PRG TYPE menu).
3. Enter a string to label the object (with "" delimiters).
4. Enter the SWAP + commands to swap and concatenate the strings.
5. Enter a number specifying the line to display the string on.
6. Enter the DISP command (PRG OUT menu).
« ... object STR label SWAP + line DISP ... »
DISP displays a string without its "" delimiters.
Example:
The following program TSTRING is identical to TINPUT, except that it converts the program
result to a string and appends a labeling string to it.
Program:
«
"Key in a, b"
{ ":a:
INPUT OBJ
TORSA
STR
"Area = "
SWAP +
CLLCD 1 DISP 3 FREEZE
»
`OTSTRING ‰
Execute TSTRING to calculate the area of the torus with a = 1.5 and b = 1.85. The labeled answer appears in the
status area.
@·J%TSTRI%
1.5 ˜1.85 `

Pausing to Display Output

To pause to display a result:
1. Enter commands to set up the display.
2. Enter the number of seconds you want to pause.
3. Enter the WAIT command (PRG IN menu).
WAIT suspends execution for the number of seconds in level 1. You can use WAIT with DISP to display
messages during program execution — for example, to display intermediate program results. (WAIT interprets
arguments 0 and –1 differently — see "Using WAIT for Keystroke Input" on page 1-46.)
1-48 RPL Programming
Comments:
:b:" {1 0} V}
Converts the result to a string.
Enters the labeling strings.
Swaps and adds the two strings.
Displays the resultant string, without
its delimiters, in line 1 of the display.
Stores the program in TSTRING.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

49g+

Table of Contents