[Info-vax] DCL Integer Overflow
Arne Vajhøj
arne at vajhoej.dk
Sun Jul 2 16:27:34 EDT 2017
On 7/2/2017 4:14 PM, Arne Vajhøj wrote:
> On 7/2/2017 11:45 AM, Scott Dorsey wrote:
>> <VAXman- @SendSpamHere.ORG> wrote:
>>> In need of real math? Use Fortran!
>>
>> Fortran doesn't allow me to pitch an exception on integer overflow
>> either,
>> does it? I can do it on a float, but with integers I need to check
>> explicitly
>> before every operation.
>
> I don't think the standard did/do.
>
> But on VMS sure.
>
> With the code posted a minute ago:
>
> $ for/old/warn=all intovf.for /check=over
> $ link intovf
> $ run intovf
> 2147483647 7FFFFFFF 17777777777
> %SYSTEM-F-HPARITH, high performance arithmetic trap, Imask=00000001,
> Fmask=00000
> 000, summary=40, PC=00000000000300A8, PS=0000001B
> -SYSTEM-F-INTOVF, arithmetic trap, integer overflow at
> PC=00000000000300A8, PS=0
> 000001B
> %TRACE-F-TRACEBACK, symbolic stack dump follows
> image module routine line rel PC abs PC
> INTOVF INTOVF INTOVF 5 00000000000000A8
> 00000000000300A8
> 0 FFFFFFFF8037FC44
> FFFFFFFF8037FC44
> %TRACE-I-END, end of TRACE stack dump
Being supported on VMS is rather expected due to:
.entry foobar,^m<iv>
Arne
More information about the Info-vax
mailing list