Mime-Version:
1.0
Date:
Thu, 12 Nov 1998 11:47:44 -0500
Content-Type:
text/plain; charset="us-ascii"
|
At 09:58 AM 11/11/98 -0500, W. Wesley Groleau x4923 wrote:
>If your algorithm depends on a type or object having a certain range or
>size, you declare the type or object accordingly, and tell your suppliers
>you can only accept compilers and hardware that will accept your
>declarations.
It is actually better, if you need a 32-bit Integer type, to declare:
subtype Integer32 is Integer range -2_147_483_648..2_147_483_647;
for Integer32'Size use 32;
or some such. The declaration will be rejected in Ada 95 if Integer does
not have the required range, this is a change from Ada 83. (Of course, it is
possible that you will run into a compiler that supports 32-bit Integer
types, but where Integer is larger. You can detect that--if it is
important--by adding:
X: Integer;
for X'Size use 32;
Robert I. Eachus
with Standard_Disclaimer;
use Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...
|
|
|