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-Thread: 103376,5b3aa4bc9027f04e X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!e38g2000yqa.googlegroups.com!not-for-mail From: sjw Newsgroups: comp.lang.ada Subject: Re: Unconstrained Arrays Date: Wed, 25 Mar 2009 14:21:45 -0700 (PDT) Organization: http://groups.google.com Message-ID: <000dc793-a278-4379-b44e-e5aa7375b0fc@e38g2000yqa.googlegroups.com> References: <1a8008fb-c840-45bc-824c-d10eec9fe569@d36g2000prf.googlegroups.com> <0caa9cf8-0620-4544-9b2c-2c9f24142b7f@v23g2000pro.googlegroups.com> <386b0e00-a1c6-4c5f-adf7-89b8543d0e2d@c11g2000yqj.googlegroups.com> <46281cbb-2804-41e8-87a0-251c9060d4d1@c36g2000yqn.googlegroups.com> NNTP-Posting-Host: 82.20.239.213 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1238016105 16919 127.0.0.1 (25 Mar 2009 21:21:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 25 Mar 2009 21:21:45 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e38g2000yqa.googlegroups.com; posting-host=82.20.239.213; posting-account=_RXWmAoAAADQS3ojtLFDmTNJCT0N2R4U User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5283 Date: 2009-03-25T14:21:45-07:00 List-Id: On Mar 20, 3:45=A0pm, Adam Beneschan wrote: > On Mar 19, 11:45 pm, sjw wrote: > Hope this helps explain things. =A0In any case, I strongly agree with > everyone else that using pointers in the OP's particular situation is > the wrong approach, and there shouldn't be any reason for it except > perhaps to work around a poor compiler implementation. Thanks for the explanation. My current problem is with this .. type Stream_Type (Buffer : access Ada.Streams.Stream_Element_Array) is new Ada.Streams.Root_Stream_Type with private; -- Provides an in-memory Stream over the elements of Buffer. -- -- When one of these Stream_Types is created, it is notionally -- empty. If Buffer is not in fact empty (perhaps it has been read -- from a datagram socket), use Set_Last to indicate the index of -- the last valid element. where having to initialize a buffer of size 2048 (say) with useless data and then overwrite it by reading from a socket goes against the grain. Perhaps I'll be able to find the Ada way of doing it and it will be suitably elegant.