In message <[email protected]>,
Michael Bulford <[email protected]> writes
Hi George
There is an error in the Turbo parser at line 14490. Here is this line:
14490 IF var%>0
AND (struct%(var%)&&directive_mask%)=directive_mask%
Both sides of the "AND" get to be evaluated. Although var% is tested
for being non
negative on the left hand side, the right hand side will be evaluated in any
event. Should var% happen to be
negative, then struct%(var%) would be outside of the array bounds and will
crash SuperBASIC. The above line needs
to be re written so that the right hand side will only be evaluated if the left
hand side evaluates to true. Here is my
suggested work-around:
14444 LOCal both :
REMark (if needed)
14488 both = 0
14489 IF var%>0:IF
(struct%(var%)&&directive_mask%)=directive_mask% : both = 1
14490 IF both
Michael
I use the logical method, of defining 'true' and 'false', as a global
value in a program.
500 true=1 : false=NOT true
Then you can use
1000 IF true
1010 REMark Take an action ...
etc .....
This makes the program easier to follow.
--
Malcolm Cadman
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm