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 Path: g2news2.google.com!postnews.google.com!o9g2000yqj.googlegroups.com!not-for-mail From: sjw Newsgroups: comp.lang.ada Subject: Re: Null Range in Unconstrasined Array Date: Wed, 9 Sep 2009 12:22:42 -0700 (PDT) Organization: http://groups.google.com Message-ID: <51c7d71e-d71c-442c-aa47-55acb2ee0f6d@o9g2000yqj.googlegroups.com> References: <76a9c14b-c573-4fd4-bbd8-7ab3bd078d79@j9g2000prh.googlegroups.com> <68f49a20-2142-46ee-bed8-e5b3cad398e0@l35g2000pra.googlegroups.com> NNTP-Posting-Host: 82.30.110.254 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1252524162 22172 127.0.0.1 (9 Sep 2009 19:22:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 9 Sep 2009 19:22:42 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o9g2000yqj.googlegroups.com; posting-host=82.30.110.254; posting-account=_RXWmAoAAADQS3ojtLFDmTNJCT0N2R4U User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8261 Date: 2009-09-09T12:22:42-07:00 List-Id: On Sep 9, 9:35=A0am, Stephen Leake wrote: > Adam Beneschan writes: > > To elaborate on this a bit further: Suppose you define a record type > > for reading a file with Ada.Direct_IO, that looks something like this: > > > =A0 type Employee_Data is record > > =A0 =A0 =A0 Name =A0 =A0 : String (1 .. 50); > > =A0 =A0 =A0 Address1 : String (1 .. 40); > > =A0 =A0 =A0 Address2 : String (1 .. 40); > > =A0 =A0 =A0 City =A0 =A0 : String (1 .. 30); > > =A0 =A0 =A0 State =A0 =A0: String (1 .. 2); > > =A0 =A0 =A0 ... > > =A0 end record; > It _could_ depend on whether there's a pragma Pack, or a > representation clause, for the record. In the absence of such, I would > expect the compiler to treat these components the same way it treats > separate objects. Which means I would expect the bounds to be stored > with the object. After leaving out the ..., GNAT allocates 162 bytes for this record (no dope bytes). Also, if you stream it, it takes just 162 bytes on the stream.