HP 39gs_40gs_Mastering The Graphing Calculator_English_E_F2224-90010

T
T
h
h
e
e
B
B
r
r
a
a
n
n
c
c
h
h
c
c
o
o
m
m
m
m
a
a
n
n
d
d
s
s
IF <test> THEN <true clause> [ELSE <false clause>] END
Note the need for a double
= sign when comparing equalities. Any
number of statements can be placed in the true and false sections.
Enclosing brackets are not required, as they are in some other
languages.
CASE <if clauses> …END:
This command removes the need for nested
IF commands but is only
worth it if you have more than two or three nested
IFs. Note that colons
are not required for the
ENDs which terminate the internal IF clauses.
IFFERR <statements> THEN <statements> [ELSE <statements>] END
This can be used to error trap programs where there is a possibility of
something going wrong which would normally crash the program, such
as evaluating a function at a point for which it is undefined. By trapping
the suspect code you can supply an alternative which will perform some
other action. This will tend to make your programs more user friendly
and is a very good idea!
287