09-08-2015, 10:58 PM
ivorget Wrote:It was undefined so it was implicitly defined as UBYTE. And yes it works fine if explicitly defined as UINTEGER.
So not so serious then but I still think it's a minor bug because the compiler is clearly using the FOR range to decide what implicit size n should have - shouldn't it switch to UINTEGER at 255 instead of 256 as it appears to do now?
OK, makes sense!
Although I suppose it gave you a warning telling you it was assuming UBYTE type for n. A compiler warning (usually) means the compiler is simply trying to guess how to fix the programmer's fault. For this reason, I would classify this case as "room for improvement" in the compiler, not really as a bug
