09-09-2015, 12:36 AM
I have seen those warnings for other undefined variables but unfortunately there is no such warning if first use is a FOR (unless I specify --explicit) so that should probably be fixed at least. After testing some more, I also found the same problem occurs where ever the (upper-range + step) exceeds a type boundary like 65535, -128 etc.
I was curious enough to hack a fix myself though it probably needs to be thought threw a bit more by someone more familiar with the compiler such as yourself. Anyway here it is:
If zxbparser.py line 1351:
is changed to these two lines:
that seems to fix the problem
I was curious enough to hack a fix myself though it probably needs to be thought threw a bit more by someone more familiar with the compiler such as yourself. Anyway here it is:
If zxbparser.py line 1351:
Code:
id_type = common_type(common_type(p[4], p[6]), p[7])
Code:
beyond = make_number(p[6].value + p[7].value,p.lineno(2)) # upperbound + step
id_type = common_type(common_type(p[4], beyond), p[7])
that seems to fix the problem
