Branch Commands - HP 39gII User Manual

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

Advertisement

Branch
Commands
IF...THEN...END
IF...THEN...ELSE...END
IFTE
IFERR...THEN...END
CASE...END
256
When assigning a value to a cell in a list, vector, or
matrix, use the
command rather than :=. For example,
the command 73
5th position of list L1. If you are entering a program using
a calculator emulator running on a computer, then => can
be used as a synonym for .
Syntax: IF test THEN command(s) END;
Evaluate test. If test is true (non 0), execute command(s).
Otherwise, nothing happens.
Example:
Syntax: IF test THEN command(s)1 ELSE command(s)2
END;
Evaluate test. If test is true (non 0), execute command(s)1,
otherwise, execute command(s)2
Syntax: IFTE(test,true_xpr,false_xpr)
Evaluates test. If test is true (non 0), return true_xpr,
otherwise return false_xpr
IFERR commands1 THEN commands2 [ELSE
commands3] END;
Executes sequence of commands1. If an error occurs
during execution of commands1, execute sequence of
commands2. Otherwise, execute sequence of
commands3.
Syntax:
CASE
IF test1 THEN commands1 END
IF test2 THEN commands2 END
...
[DEFAULT commands]
END;
Evaluates test1. If true, execute commands1 and end the
CASE. Otherwise, evaluate test2. If true, execute
L1(5) will put the number 73 into the
Programming

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents