EasyManuals Logo

HP 32SII User Manual

HP 32SII
376 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 #212 background imageLoading...
Page #212 background image
13–22 Programming Techniques
File name 32sii-Manual-E-0424
Printed Date : 2003/4/24 Size : 17.7 x 25.2 cm
STO(i)
RCL(i)
STO +, –,
×
,
÷
, (i)
RCL +, –,
×
,
÷
, (i)
XEQ(i)
GTO(i)
X<>(i)
INPUT(i)
VIEW(i)
DSE(i)
ISG (i)
SOLVE(i)
FN d(i)
FN=(i)
Program Control with (i)
Since the contents of i can change each time a program runs–or even in
different parts of the same program — a program instruction such as
!6L5
can branch to a different label at different times. This maintains
flexibility by leaving open (until the program runs) exactly which variable or
program label will be needed. (See the first example below.)
Indirect addressing is very useful for counting and controlling loops. The
variable i serves as an index, holding the address of the variable that
contains the loop–control number for the functions DSE and ISG. (See the
second example below.)
Example:
Choosing Subroutines With (i).
The "Curve Fitting" program in chapter 16 uses indirect addressing to
determine which model to use to compute estimated values for x and y.
(Different subroutines compute x and y for the different models.) Notice that i
is stored and then indirectly addressed in widely separated parts of the
program.
The first four routines (S, L, E, P) of the program specify the curve–fitting model
that will be used and assign a number (1, 2, 3, 4) to each of these models.
This number is then stored during routine Z, the common entry point for all
models:
'
!
L
Routine Y uses i to call the appropriate subroutine (by model) to calculate the
x– and y–estimates. Line Y03 calls the subroutine to compute y:
&
%1L2

Table of Contents

Other manuals for HP 32SII

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP 32SII and is the answer not in the manual?

HP 32SII Specifications

General IconGeneral
TypeScientific
Display TypeLCD
ProgrammingYes
Entry SystemRPN
Power SourceBatteries
Dimensions147 x 81 x 23 mm

Related product manuals