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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e5fae12a81834f90 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-23 06:56:07 PST Path: supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!news.algonet.se!algonet!news.tele.dk!193.174.75.178!news-fra1.dfn.de!news-koe1.dfn.de!news-han1.dfn.de!news.fh-hannover.de!news.cid.net!news.enyo.de!news1.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: AdaYY wish list from current projects Date: 23 Feb 2001 16:04:21 +0100 Organization: Enyo's not your organization Message-ID: <87zofdzbii.fsf@deneb.enyo.de> References: <96ulad$r9e$1@belenus.iks-jena.de> <87u25nnfer.fsf@deneb.enyo.de> <87elwp3fw4.fsf@deneb.enyo.de> <87lmqx1p47.fsf@deneb.enyo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Xref: supernews.google.com comp.lang.ada:5475 Date: 2001-02-23T16:04:21+01:00 List-Id: lutz@iks-jena.de (Lutz Donnerhacke) writes: > Yep. I talk about values crossing a storage_element boundary and you > talk about invalid values. Oh, sorry. I still have to see some code which shows that record representation clauses are practicall even if the components occupy multiple storage elements. ;-) > procedure t is > type pstring(len : Integer) is record > data : String (1 .. len); > end record; > pragma Pack (pstring); -- record representation clause not possible > > ex : pstring; -- Won't work; > for ex'Address use 16#00000#; > begin > Put_Line (Integer'Image (ex.len) & " => " & ex.data); > end t; Perhaps you want to use a constrained integer type in conjunction with a record discriminant with a default expression? > >> The problem escaped from a 'multiprotocol router'. Please try to map a IPv4 > >> header incl. payload and IP-header options. > > > >Ah. Well, obviously, you can't use a single record in this case. > > So I'm stuck to implement gather-scatter from the beginning. ;-/ Why that? You can still have the records in consecutive storage locations, but you have to do some manual address calculations.