EasyManuals Logo
Home>HP>Calculator>48GII

HP 48GII User Manual

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
Page #54 background imageLoading...
Page #54 background image
1-28 RPL Programming
To change the current flag states:
1. Enter the flag-state argument- see below
2. Execute STOF (!°L %MODES% %FLAG% L%STOF% ).
STOF sets the current states of flags based on the flag-state argument:
gn
s
Changes the states of only the system flags.
f gn
s-lower
gn
u-lower
gn
s-upper
gn
u-upper
!hChanges the states of the system and user flags.
Example: The program PRESERVE on page 2-6 uses RCLF and STOF.
Using Subroutines
Because a program is itself an object, it can be used in another program as a subroutine. When program B is
used by program A, program A calls program B, and program B is a subroutine in program A.
Example: The program TORSA calculates the surface area of a torus of inner radius a and outer radius b.
TORSA is used as a subroutine in a second program TORSV, which calculates the volume of a torus.
The surface area and volume are calculated by
A π
2
b
2
a
2
()= V
1
4
---
π
2
b
2
a
2
()ba()=
(The quantity in the second equation is the surface area of a torus calculated by TORSA.)
Here are the stack diagram and program listing for TORSA.
Level 2 Level 1 " Level 1
a b
"
surface area
Program: Comments:
"!
#!$!%!
+iWH.-%WH0$WH/+!
#=5M
Creates local variables a and b.
Calculates the surface area.
Converts algebraic to a number.
»
`
O TORSA K
Puts the program on the stack.
Stores the program in TORSA.
π
2
b
2
a
2
()

Table of Contents

Other manuals for HP 48GII

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP 48GII and is the answer not in the manual?

HP 48GII Specifications

General IconGeneral
Battery typeCR2032
TypeScientific
Form factorPocket
Weight and Dimensions IconWeight and Dimensions
Weight220 g
Dimensions (WxDxH)184 x 87 x 23.5 mm

Related product manuals