
.TRANSF.SHAPE
.TRANSF.MAT
(continued…)
Since the default contents of
any variable is zero and
there is no zero’th option on
a list this means a program
bug waiting to happen unless
you preset the value.
Options 1 and 2 load preset
This program uses the
CHOOSE
command to offer
a list of options. Note the
need to pre-load a value into
C
. This value determines
which option is initially
highlighted when the menu
appears. If a list has only
three options but the highlight
is set to some other value
than those three then it can
crash the program.
matrices while option 3
allows the user to edit their
own. Note the check to
ensure the matrix they entered
has a valid size. The number
of columns is then extracted
and used to reset the value of
Tmax
. The new image
matrix is also recalculated.
Note: The indenting used is
not required and is there
simply to make the program
easier to read. The amount of
memory take up by a few
extra spaces is minimal but
well worth it in terms of
readability.
This program puts up a
message instructing the user
and then allows them to edit
the transformation matrix in
M1
. The size of the matrix is
checked to ensure it is 2x2,
with the
DO…UNTIL
loop
ensuring that the user cannot
exit without a valid matrix
entered.
Assuming that you have
the
.TRANSF.SV
program to create the new altered
VIEWS
menu then you
can now test the aplet. Don’t forget that you must
the aplet first to ensure that the new
VIEWS
menu is
attached to the right aplet. Its operation should be familiar to you if you have already examined its ‘cousin’
on page 234.
269