> From [log in to unmask] Thu Nov 12 09:33 EST 1998
> Date: Thu, 12 Nov 1998 09:30:30 -0500
> From: "W. Wesley Groleau x4923" <[log in to unmask]>
> Subject: Re: Portability (was: Ada in CFD)
> To: [log in to unmask]
>
> > For Ada we would write
> > type Jint is range -2**31 .. 2**31 - 1;
> > for Jint'Size use 32;
>
> Or how about:
>
> package Interfaces.Java is
> ...
> type int is .....
>
> > And this will work on any platform where the Ada compiler
> > can handle 32 bit numbers.
>
> Actually, I have seen at least one Ada _83_ compiler that could handle
> 32-bit numbers, but could not handle the above declaration. Due to
> precedence rules, they felt they had to compute 2**31 first, and then
> print
>
> type ..... is range -2**31 .. 2**31 - 1;
> ^ ^
> (cryptic message that has something to do with available machine types)
>
> The ugly workaround was
>
> Big_Number : constant := 2**30;
>
> type ..... is range (- Big_Number - Big_Number) ..
> ((Big_Number - 1) + Big_Number);
>