Re: Possible bug (sorry if it's a repeat)
- Posted by Robert Craig <rds at ATTCANADA.NET> Jun 29, 1999
- 486 views
Jeffrey Fielding writes: > constant MAX_INTEGER = 1073741823 > ... > integer x, y > x = MAX_INTEGER > x += 1 -- No error > x = MAX_INTEGER > x = x + 1-- No error > y = x -- No error Yes, you've found a bug. Thanks. It's trivial to fix. I'll do it for the next major release (probably not the Linux pre-alpha - it's coming in a day or two.) The code that adds the constant value 1 to an integer (via += or the regular assignment) tests for, but fails to report, the type_check failure. If you add a different number, or you subtract from the minimum integer, it will be caught. Assigning y = x doesn't catch the error because the compiler "knows" that x is an integer, so no type check is performed. Regards, Rob Craig Rapid Deployment Software http://members.aol.com/FilesEu/