
I%=20000
J%=-18000
K%=20000
M%aI%+J%+K%
could produce an incorrect result when run.
If the compiler
actu~lly
performs
the
arithmetic
in
the order shown, no
overflow occurs.
However, if the
compiler
performs
I%+K%
first
and
then
adds
J%,
an
overflow
will
occur.
The
compiler follows
the
rules
for
operator
precedence
and
parenthetic
modification
of
such precedence, but no other
guarantee of evaluation order can be made.
In order to produce the fastest and most compact object code
possible,
make
maximum
use
of
integer
variables.
For
example, this program
FOR I=1 TO
10
A(I)~O
NEXT I
can
execute
approximately
30
times
faster
by
simply
substituting RI%" for "I".
It is especially advantageous to
use integer variables
to
compute
array
subscripts.
The
generated code is significantly faster and more compact.
Summary of Contents for Basic Interpreter Basic 80
Page 1: ...5IA iC intc tit tcl c t ...
Page 2: ......
Page 6: ... ...
Page 10: ......
Page 26: ......
Page 33: ...2 5 Intentially left blank ...
Page 37: ...BASIC SO COMMANDS AND STATEMENTS 2 9 Intentially left blank ...
Page 112: ......
Page 136: ......
Page 140: ......
Page 160: ......
Page 165: ......
Page 166: ......
Page 174: ......
Page 176: ......
Page 182: ......
Page 184: ......
Page 190: ......