Download Print this page

HP 35s Instruction Manual page 4

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

Advertisement

hp calculators
HP 35s Using HP 35s Flags
Flags 5 through 11 are special-purpose flags, and their state is not shown at the top of the screen. Each flag has a
special meaning when it is set.
The user can set flag 5 to say that a program should stop if any calculation produces a result bigger than the largest
number the HP 35s can handle. The number is replaced by the largest number the HP 35s can handle and the message
OVERFLOW is displayed. If flag 5 is clear, the program continues to run, and OVERFLOW is displayed for a short time
when the program finishes running.
The calculator automatically sets flag 6 if an overflow occurs, or if a number in a non-decimal base is larger than the
calculator can handle. This can be very useful in programs – a program can test flag 6 to see if a calculation has
produced an overflow, and if so then the program can deal with the problem. Flag 6 should be cleared after it has been
set, so that it can be used to test if another error occurs later.
Flag 7 is set when fraction display mode is active. It becomes set when ºÉ is first pressed, and it is cleared
when ºÉ is pressed again. It is also set when SF 7 is carried out on the keyboard or in a program. When flag 7
is cleared, fraction display is cancelled. This means that a program can set flag 7 to display a result as a fraction, and
can later clear flag 7 so that further results can be displayed as usual.
When flag 8 is set, fractions are displayed with the denominator equal to the number stored by the Ê command, but the
fraction is simplified unless flag 9 is set too. For example, the number 0.5 is displayed as 5/10 if 10 is stored by the Ê
command and flag 8 is set. If flag 9 is clear, the 5/10 is simplified to 1/2 but if flag 9 is set, it is not simplified.
When flag 10 is clear (its normal state) any equation in a program is worked out and its result is put on the stack for use
by the program. When flag 10 is clear an equation in a running program is displayed as a message and is not worked
out. This means that an equation can be shown to the user, or that a message can be written as if it were an equation,
and can then be displayed instead of being calculated; the message does not need to work as an equation, it could even
say "HELLO, WORLD". Flag 10 can be set before some equations, and cleared before others, so that a mixture of
equations and messages can be used in a program.
When flag 11 is set, a working program stops and asks for the value of each variable in an equation when it comes to an
equation and flag 10 is clear. If the equation is used in integration (") or in solving (sÛ), there is no prompt
for the unknown variable, or the variable of integration. If flag 11 is clear, the value already stored in each variable, or 0 if
no value has been stored, is used.
Flags 5 through 11 can also be used in programs as if they were general-purpose flags, as long as this does not interfere
with their special uses. For example flag 9 can be used freely so long as flag 8 is not set. Any program that uses these
flags for general purposes should leave them cleared when it is completed.
To use flags 10 and 11 with the flag commands, first press the decimal point key Ë, then press 0 or 1.
Note: for details of equations, programs, fractions, solve and integrate, see the separate training aids on these topics.
Using Flags in Programs
The commands SF, CF and FS? can be very useful in programs. The examples below will show some of the ways in
which flags can help in programs.
hp calculators
- 4 -
HP 35s Using HP 35s Flags - Version 1.0

Advertisement

loading