From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bb6f4bd169077fb3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-24 08:46:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!lnsnews.lns.cornell.edu!news.litech.org!eurocyber.net!newsfeed.muc.eurocyber.net!newsfeed.vmunix.org!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: "Martin Krischik" Newsgroups: comp.lang.ada Subject: Re: Representing data differently Date: Sun, 23 Feb 2003 14:06:51 +0100 Organization: never organized Message-ID: References: <686be06c.0302070615.3943b629@posting.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 X-Trace: news.t-online.com 1046105124 00 13477 YEQkEPBbSeYsqB 030224 16:45:24 X-Complaints-To: abuse@t-online.com X-Sender: 05341395658-0001@t-dialin.net User-Agent: Pan/0.13.0 (The whole remains beautiful) Xref: archiver1.google.com comp.lang.ada:34518 Date: 2003-02-23T14:06:51+01:00 List-Id: On Sat, 22 Feb 2003 14:09:09 +0000, Robert A Duff wrote: > "Martin Krischik" 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