Trident Help

RPN Advanced 42 manual · Chapter 13 of 18

Flags

Set, clear and test the 100 user flags, used mainly for decisions inside programs.

13.1Set, clear and test a flag#

A flag is a yes/no memory bit. There are 100 of them, numbered 00 to 99. Flags 00 to 35 and 81 to 99 are yours to set and clear (a few have a meaning: 25 ignores the next error, 28 set means a point as the radix and clear a comma, 29 shows digit groups). Flags 36 to 80 report the calculator's state and can only be tested: 36 to 39 the number of digits, 40 and 41 the display format, 42 GRAD, 43 RAD, 45 solving, 46 integrating, 48 ALPHA mode, 52 PRGM mode, 56 to 59 the curve-fit model, 60 ALLΣ, 73 polar and 74 real results; SF or CF on them gives Restricted Operation. Open FLAGS with shift 6. SF sets a flag, CF clears it, FS? asks whether it is set, FC? asks whether it is clear. FS?C and FC?C ask and then clear the flag. Type the flag number as two digits (or one digit and ENTER).

The FLAGS menu. The display shows: x: 0.0000 /  SF  CF FS? FC? FSC FCC.
The FLAGS menu.
Example 13.1

Set a flag and test it

  1. Set flag 05 with SF (first key).

    ⇧FLAGS6Σ+05
  2. Ask if flag 05 is set with FS? (third key).

    √x05
    After step 2: Ask if flag 05 is set with FS? (third key). The display shows: Yes /  SF  CF FS? FC? FSC FCC.
Result of the example "Set a flag and test it" The display shows: Yes /  SF  CF FS? FC? FSC FCC.
You should seeYes
Example 13.2

Clear a flag

  1. Set then clear flag 05, then test it.

    ⇧FLAGS6Σ+051/x05√x05
Result of the example "Clear a flag" The display shows: No /  SF  CF FS? FC? FSC FCC.
You should seeNo
Example 13.3

Test and clear

  1. FS?C answers Yes and clears the flag; the next test says No.

    ⇧FLAGS6Σ+07LN07√x07
Result of the example "Test and clear" The display shows: No /  SF  CF FS? FC? FSC FCC.
You should seeNo
Example 13.4

A system flag

  1. In FIX mode flag 40 is set.

    ⇧FLAGS6√x40
Result of the example "A system flag" The display shows: Yes /  SF  CF FS? FC? FSC FCC.
You should seeYes
Example 13.5

System flags cannot be set

  1. SF 40 is not allowed.

    ⇧FLAGS6Σ+40
Result of the example "System flags cannot be set" The display shows: Restricted Operation /  SF  CF FS? FC? FSC FCC.
You should seeRestricted Operation

HP-42S is a trademark of HP Inc.. Trident Calculator is an independent product by South View Studios and is not affiliated with, sponsored by or endorsed by HP. The name is used only to describe the kind of calculator this model resembles; Trident's names, keys, display, fonts and software are its own clean-room design.