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-Thread: 103376,5b3aa4bc9027f04e X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news2.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!cyclone1.gnilink.net!gnilink.net!nx02.iad.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Unconstrained Arrays Date: Fri, 27 Mar 2009 09:39:51 +0100 Organization: Adalog Message-ID: 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> <000dc793-a278-4379-b44e-e5aa7375b0fc@e38g2000yqa.googlegroups.com> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1238135994 16104 195.25.228.57 (27 Mar 2009 06:39:54 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Fri, 27 Mar 2009 06:39:54 +0000 (UTC) User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <000dc793-a278-4379-b44e-e5aa7375b0fc@e38g2000yqa.googlegroups.com> Xref: g2news2.google.com comp.lang.ada:5332 Date: 2009-03-27T09:39:51+01:00 List-Id: sjw a �crit : > > 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. > -- But why do you need to pass a Stream_Element_Array? Why not pass the size as a discriminant, and have the buffer internal to Stream_Type. If you really need to access the buffer from the outside, you could have a Get_Buffer function on Stream_Type that returns (your choice) the buffer content, or a pointer to the internal buffer. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr