EasyManua.ls Logo

HP 48GII

HP 48GII
653 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
RPL Programming 1-41
Example: The command-line string Ix522<K!E6M6:xI displays x522<K!E6M6:x´ in the
command line. If you press 200 `the return string is Ix522<K!E6M6:xH88I. When OBJ" extracts the
text from the string, it strips away the @ characters and the enclosed characters, and it returns the number 200.
(See "Creating Programs on a computer" on page 1-7 for more information about @ comments.)
Example: The following program, TINPUT, executes INPUT to prompt for the inner and outer radii of a
torus, then calls TORSA (page 1-28) to calculate its surface area. TINPUT prompts for a and b in a two-row
command line. The level 1 argument for INPUT is a list that contains:
! The command-line string, which forms the tags and delimiters for two tagged objects.
! An embedded list specifying the initial cursor position.
! The N parameter to check for invalid syntax in the result string.
Program: Comments:
"!
Ir)@!tG!$F!%I
The level 2 string, displayed at the top of the
stack area.
fIl$l !%lIf3!8hNh
The level 1 list contains a string, a list, and the
verify option. (To key in the string, press
@Õ!ê a ™@ë!ê b.
After you press `to put the finished program
on the stack, the string is shown on one line, with
indicating the newline character.) The
embedded list puts the insert cursor at the end of
row 1.
6=25:
Displays the stack and command-line strings,
positions the cursor, sets Program-entry mode,
and suspends execution for input.
LS_#
Converts the string into its component objects —
two tagged objects.
:LKDB
Calls TORSA to calculate the surface area.
»
`O TINPUT
Stores the program in TINPUT.
Execute TINPUT to calculate the surface area of a torus of inner radius a = 10 and outer radius b = 20.
J %TINPU%
Key in the value for a, press ˜ to move the cursor to the next prompt, then key in the value for b.

Table of Contents

Other manuals for HP 48GII

Related product manuals