[Info-vax] DCL Integer Overflow
Scott Dorsey
kludge at panix.com
Sat Jul 1 14:07:01 EDT 2017
On 6/30/2017 5:06 AM, GerMarsh wrote:
> I know that there have been a few discussions about
> enhancing/replacing DCL, but I wonder if someone will fix the old
> integer overflow which has been there since the year dot...
>
> $ int=%x7fffffff
> $ sho sym int
> INT = 2147483647 Hex = 7FFFFFFF Octal = 17777777777
> $ int=int+1
> $ sho sym int
> INT = -2147483648 Hex = 80000000 Octal = 20000000000
This is not a bug, it's a feature.
If you don't want it to roll over, what DO you want it to do?
Halt with an error?
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
More information about the Info-vax
mailing list