Download  Print this page

HP -28S Manual Page 253

Advanced scientific calculator.
Hide thumbs

Advertisement

Look at the general rules at the beginning of this section. Now you
can choose one of the three alternatives described in step 4.
For this example, press
SST
repeatedly until the
0
annunciator dis-
appears, indicating that FIB2 is completed. (These single-steps not
shown here.)
The calculation for F} executes only the THEN clause in FIB2.
For the second example, execute 3 F I 82 and single-step through
the calculation for F
3 .
This executes the ELSE clause, including the
START ... NEXT loop. You'll see that, for
n
=
3, the START ...
NEXT loop is executed twice.
For the third example, suppose you want to single-step the START ...
NEXT loop as a whole-seeing the stack before each iteration of the
loop, but not single-stepping all the steps in FIB2 or in the loop itself.
To do so, move the HALT command inside the loop. Then FIB2 won't
halt until it reaches the loop, and you can use
.1
CO NT
I
(continue) to
execute the loop one iteration at a time.
Use VISIT to return FIB2 to the command line.
I
USER
I
~
FIB2
.1
VISIT
I
• HALT
"*
n
«
IF
n
1
f
THEN
n
Use the cursor menu keys to delete HALT. Then insert HALT as
shown (following the START command).
Store the edited version of FIB2.
I
ENTER
I
IF n 1
f
THEN
n
ELSE 0 1 2
n
START HALT .DUP
Roo.
Start the calculation for F
3 .
FIB2 will halt before performing the loop.
3
FI82
IL ____ .JI
252
28: Programming Examples

Advertisement

Table of Contents

   Also See for HP HP-28S

   Related Manuals for HP HP-28S

Comments to this Manuals

Symbols: 0
Latest comments: