HP 39G User Manual page 224

Graphing calculator
Hide thumbs Also See for 39G:
Table of Contents

Advertisement

IF... THEN...
ELSE... END
CASE...END
IFERR...
THEN...
END...
15-18
Executes the true-clause sequence of commands if the test-
clause is true, or the false-clause sequence of commands if the
test-clause is false.
IF test–clause
THEN true-clause ELSE false-clause END
Example
1 A :
IF A==1
THEN MSGBOX A " EQUALS 1" :
ELSE MSGBOX A " IS NOT EQUAL TO 1" :
END
Executes a series of test-clause commands that execute the
appropriate true-clause sequence of commands. Its syntax is:
CASE
IF test-clause
THEN true-clause
1
IF test-clause
THEN true-clause
2
.
.
.
IF test-clause
THEN true-clause
n
END
When CASE is executed, test-clause
is true, true-clause
is executed, and execution skips to END.
1
If test-clause
if false, execution proceeds to test-clause
1
Execution with the CASE structure continues until a true-
clause is executed (or until all the test-clauses evaluate to
false).
Many conditions are automatically recognized by the HP
39G/40G as error conditions and are automatically treated as
errors in programs.
IFERR...THEN...END allows a program to intercept error
conditions that otherwise would cause the program to abort.
Its syntax is:
IFERR trap-clause
THEN error-clause END
END
1
END
2
END
n
is evaluated. If the test
1
.
2
Programming

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

40g

Table of Contents