comp.lang.ada
 help / color / mirror / Atom feed
From: Christoph Grein <christoph.grein@eurocopter.com>
Subject: Re: ARG Urgent Problems (was: labeling)
Date: Wed, 20 Mar 2002 15:07:18 +0100 (MET)
Date: 2002-03-20T15:07:18+01:00	[thread overview]
Message-ID: <mailman.1016633342.7772.comp.lang.ada@ada.eu.org> (raw)

>The only problem being that your compiler might reject to compile this because
>>it cannot fulfil the request. My_Int'Base will necessarily be a 
>_signed_integer_
>>at least big enough to hold the specified range, will thus need at least 33
>>bits, most probably a 64 bit
>>type.
>True, but there is no requirement that T'Base occupies the same number of bits 
       ~~~
       The "but" is unnecessary here, you repeat in other words what I wanted to 
       say. If there is no such type on your machine, the compiler will reject
       the declaration. Gnat provides a 64 bit type, as you've tried:
>as T.
>I just tried the following with Gnat:
>    type Int32 is range 0..2**32-1;
>    for Int32'size use 32;
>    I : Int32;
>    B: Int32'Base;
>begin
>   Put_Line (Integer'image (I'size));
>   Put_Line (Integer'Image (B'size));
>
>And it prints:
>32
>64



             reply	other threads:[~2002-03-20 14:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-20 14:07 Christoph Grein [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-03-19 13:36 ARG Urgent Problems (was: labeling) Christoph Grein
2002-03-20 12:19 ` Jean-Pierre Rosen
2002-03-15  8:20 labeling (was: partitioning (was: Future)) Christoph Grein
2002-03-15 11:59 ` ARG Urgent Problems (was: labeling) Larry Kilgallen
2002-03-17 12:59   ` Tarjei T. Jensen
2002-03-17 13:11     ` Nick Williams
2002-03-19  9:22       ` Tarjei T. Jensen
2002-03-19 12:21         ` Jean-Pierre Rosen
2002-03-19 14:38           ` Tarjei T. Jensen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox