Example: System Flag. The following program sets an alarm for June 6, 2007 at 5:05 PM. It first tests the status of system flag
Example:
Program: | Comments: |
|
|
« |
|
IF | Tests the status of flag |
Format flag. | |
THEN | If flag |
6.152007 | month/day/year format. |
ELSE | If flag |
15.062007 | day.month.year format. |
END | Ends the conditional. |
17.05 "TEST COMPLETE" | Sets the alarm: 17.05 is the alarm time |
3 →LIST STOALARM | and “TEST COMPLETE” is the |
| alarm message. |
» |
|
|
|
Example: User Flag. The following program returns either the fractional or integer part of the number in level 1, depending on the state of user flag 10.
Program: | Comments: | |
|
|
|
« |
|
|
IF |
| Starts the conditional. |
10 | FS? | Tests the status of user flag 10. |
THEN | If flag 10 is set, returns the integer part. | |
IP |
|
|
ELSE | If flag 10 is clear, returns the fractional part. | |
FP |
|
|
END |
| Ends the conditional. |
» |
|
|
|
|
|
To use this program, you enter a number, either set flag 10 (to get the integer part) or clear flag 10 (to get the fractional part), then run the program.
Recalling and Storing the Flag States
If you have a program that changes the state of a flag during execution, you may want it to save and restore original flag states.
The RCLF (recall flags) and STOF (store flags) commands let you recall and store the states of the calculator’s flags. For these commands, a