BREAK
This command will exit from the current loop, resuming execution after the end of it.
Calculator Tip
There is no GOTO <label> command in the language as there is on
some other calculators. This is often seen as a disadvantage by
inexperienced programmers but in fact it usually results in code which is
far more easy to read and much less likely to have bugs in it. Labels
generally result in what is known in the trade as ‘spaghetti code’, so
called because it has odd GOTO’s that lead all over the place,
intertwining and making it almost impossible to follow. There is no
situation in which a GOTO statement cannot be replaced by one of the
loops or conditional branches available in the HP Basic language.
T
T
h
h
e
e
M
M
a
a
t
t
r
r
i
i
x
x
c
c
o
o
m
m
m
m
a
a
n
n
d
d
s
s
EDITMAT <matrix var>
key at the
bottom. When the user presses
, execution resumes after the
EDITMAT
statement.
This command pops up a window in which the user can edit or input a matrix with an
REDIM <matrix var>;<size>
This command is very useful if the size of a matrix is not known in
advance. The user might be prompted to input the size and then these
values used to resize it. Note that the dimensions must be supplied as a
list variable. The
SIZE
command can also be used in this context as it
returns a list variable when used with a matrix. For example, you could
find the current
SIZE
of a matrix and then use
REDIM
to add a new
row or column.
292