02-23-2011, 01:38 PM
Messing around with some of my other code over lunchtime with the latest beta (2100), I discovered a small error when parsing brackets.
Take a look at this code:
The final PRINT statement will not compile unless you remove the brackets from around the (y - 1). Strangely, the brackets seem to be okay if we're dealing with the first dimension of the array (so it's okay to have 'x - 1' in brackets), just not for the second. :-)
Take a look at this code:
Code:
DIM test(10, 10) as UBYTE
DIM x as UBYTE
DIM y as UBYTE
x = 5
y = 5
PRINT test(x - 1, y)
PRINT test((x - 1), y)
PRINT test(x, y - 1)
PRINT test(x, (y - 1))
The final PRINT statement will not compile unless you remove the brackets from around the (y - 1). Strangely, the brackets seem to be okay if we're dealing with the first dimension of the array (so it's okay to have 'x - 1' in brackets), just not for the second. :-)