From: Christoph Grein <Christoph.Grein@eurocopter.com>
To: CLA <comp.lang.ada@ada-france.org>
Subject: Re: for Object_Size use 0
Date: Thu, 14 Apr 2005 07:20:48 +0200
Date: 2005-04-14T07:20:48+02:00 [thread overview]
Message-ID: <mailman.31.1113456844.24457.comp.lang.ada@ada-france.org> (raw)
Robert A Duff wrote:
> "Robert C. Leif" <rleif@rleif.com> writes:
>
>
>
>> I specifically need to know if it is possible to create a zero
>> sized
>> type in Ada 95 or the updated standard, which is to be released in
>> the near
>> future.
>>
>
>
> For a discrete type, Size can be zero. So in your example:
>
> type Empty_Type is (Empty);
>
> Empty_Type'Size must be zero (if there is no Size clause).
> This follows from RM-13.3(55). The same is true of
> "subtype S is Integer range 0..0;" -- S'Size = 0 by default.
> See also para 55.b in the AARM.
>
But this is only "Implementation Advice". Consequently RM-13.3(55) uses
the word "should".
But you're the language lawyer...
next reply other threads:[~2005-04-14 5:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-14 5:20 Christoph Grein [this message]
2005-04-14 14:48 ` for Object_Size use 0 Robert A Duff
-- strict thread matches above, loose matches on Subject: below --
2005-04-13 12:02 Robert C. Leif
2005-04-13 1:52 Robert C. Leif
2005-04-13 7:58 ` Martin Dowie
2005-04-13 15:51 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox