Download Print this page

HP 35s Instruction Manual page 5

Using hp 35s flags
Hide thumbs Also See for HP 35s:

Advertisement

hp calculators
HP 35s Using HP 35s Flags
Example 4: A long program has three parts. To let the user see how far it has gone, it can set flag 1 in the first part, flag
2 in the second part, and flag 3 in the third part. How is this done?
Solution:
At the beginning of the program, the user puts "SF 1" immediately after the first label.
º£ºÓA¹·11
At the end of the first part of the program, the user clears flag 1 and sets flag 2.
¹·21¹·12
At the end of the second part of the program, the user does the same, but clearing flag 2 and setting flag 3.
Finally at the end of the program, the user clears flag 3.
¹·23¹Ô
Answer:
When the program runs, with the above steps in it, it will display flag 1 in the first part, flag 2 in the second
part, and flag 3 in the third part. A long program will most likely have several labels in it, so the line
numbers at the end might have a different letter in them, not A.
Example 5: A program calculates a factorial and then uses it. To make sure the program warns the user if the factorial
of a number larger than 253 is calculated, and the result overflows, the program sets flag 5. How is this
done?
Solution:
"SF 5" is put in the program, just after the first label or just before the factorial is calculated.
º£ºÓF¹·15º*
If an overflow occurs, the program will stop at line F003 and will show the message OVERFLOW.
hp calculators
Figure 8
Figure 9
Figure 10
Figure 11
- 5 -
HP 35s Using HP 35s Flags - Version 1.0

Advertisement

loading