Example: If you execute this program segment

«"ABC?" PROMPT »

the display looks like this:

Example: The following program, TPROMPT, prompts you for the dimensions of a torus, then calls program TORSA (from page 129) to calculate its surface area. Yo u don’t have to enter data on the stack prior to program execution.

Program:

Comments:

 

 

«

 

"ENTER a, b IN ORDER:"

Puts the prompting string on the

 

stack.

PROMPT

Displays the string in the status

 

area, halts program execution, and

 

returns calculator control to the

 

keyboard.

TORSA

Executes TORSA using the just

 

entered stack arguments.

»

 

 

 

`OTPROMPT

Stores the program in TPROMPT.

 

 

 

Execute TPROMPT to calculate the volume of a torus with inner radius a = 8 and outer radius b = 10. Execute TPROMPT. The program prompts you for data.

@·J %TPROM%

Enter the inner and outer radii. After you press `, the prompt message is cleared from the status area. 8 `10

138 RPL Programming

Page 62
Image 62
HP 50g Graphing, 48gII Graphing manual `Otprompt ‰, @·J %Tprom%