comp.lang.ada
 help / color / mirror / Atom feed
From: "Martin Krischik" <Martin.Krischik@T-Online.de>
Subject: Re: Representing data differently
Date: Sun, 23 Feb 2003 14:06:51 +0100
Date: 2003-02-23T14:06:51+01:00	[thread overview]
Message-ID: <pan.2003.02.23.13.06.49.955231@T-Online.de> (raw)
In-Reply-To: wccu1ew16ay.fsf@shell01.TheWorld.com

On Sat, 22 Feb 2003 14:09:09 +0000, Robert A Duff wrote:

> "Martin Krischik" <Martin.Krischik@T-Online.de> writes:
> 
>>     for
>>         State
>>     use record
>>         uninitialized   at 0 range 0..0;  
>>         on              at 0 range 1..1;    
>>         writeLineNumber at 0 range 2..2;   
>>         writePrefix     at 0 range 3..3;   
>>     end record;
>> 
>> -- snap
>> 
>> The first statement defines the record, the second defines the layout.
>> Nothing stops you from placing two record elements at the same position.
> 
> Actually, 13.5.1(11) makes it illegal.
 
True.

--
(11)
At most one component_clause is allowed for each component of the type,
including for each discriminant (component_clauses may be given for some,
 all, or none of the components). Storage places within a component_list
shall not overlap, unless they are for components in distinct variants of
the same variant_part. 
--

So you have to combine the record layout with a variant record. Which make
the original request quite complex to implement. But then the C code wan't
easy either.

with Regards

Martin

-- 
Martin Krischik
mailto://Martin@krischik.com
http://www.ada.krischik.com




  reply	other threads:[~2003-02-23 13:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-07 14:15 Representing data differently Daniel Allex
2003-02-07 18:07 ` tmoran
2003-02-09  4:39   ` Craig Carey
2003-02-10 12:47     ` Colin Paul Gloster
2003-02-13 17:21       ` Craig Carey
2003-02-08  0:24 ` Wojtek Narczynski
2003-02-12 18:52 ` Martin Krischik
2003-02-22 19:09   ` Robert A Duff
2003-02-23 13:06     ` Martin Krischik [this message]
2003-02-23 21:09 ` Craig Carey
2003-02-23 21:59   ` tmoran
replies disabled

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