xc-basic3
xc-basic3 copied to clipboard
Wrong syntax accepted
Although it's invalid, the compiler does not complain about the following syntax:
DIM x, y AS LONG
One would assume that both x and y are defined as LONG, but this is not the case as x is defined as INT (because it is not followed by the AS keyword).
The correct syntax is
DIM x AS LONG, y AS LONG
The compiler should display an error in the first case.
Actually, the behaviour is the same in QB (where the type defaults to SINGLE)... a warning may be sufficient.