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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,865c3d125a8dbc3b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!r34g2000vbi.googlegroups.com!not-for-mail From: =?ISO-8859-2?Q?Tomek_Wa=B3kuski?= Newsgroups: comp.lang.ada Subject: Re: Howto read line from a stream Date: Sun, 31 May 2009 07:30:23 -0700 (PDT) Organization: http://groups.google.com Message-ID: <9681cfb9-e917-43b5-9d5a-ca37a622e34d@r34g2000vbi.googlegroups.com> References: <83317a97-dae5-4c84-a1ac-88a87833cf3f@q14g2000vbn.googlegroups.com> <1a90e055-44a3-4d00-b4cd-64798c731a55@e24g2000vbe.googlegroups.com> <16949835-6528-4a7a-a653-fd466b37bb45@s21g2000vbb.googlegroups.com> NNTP-Posting-Host: 83.5.175.164 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1243780223 10982 127.0.0.1 (31 May 2009 14:30:23 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 31 May 2009 14:30:23 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r34g2000vbi.googlegroups.com; posting-host=83.5.175.164; posting-account=Ar5oKAoAAAD4cyp5eTv5CtR88dGtUxxC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; pl-PL; rv:1.9.0.10) Gecko/2009042708 Fedora/3.0.10-1.fc10 Firefox/3.0.10,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:6136 Date: 2009-05-31T07:30:23-07:00 List-Id: On 31 Maj, 14:56, Tomek Wa=B3kuski wrote: > Thank you Dimitry. I have implemented something like this: I decided to return String_Access, instead of String, because of memory leak in my previous solution. I can't declare as: function Get_Line (Channel : in Stream_Access) return not null access String; when I want to use it as: declare Msg : String_Access :=3D Get_Line (Channel); begin -- Process line here Free (Msg); end; so I did this: function Get_Line (Channel : in Stream_Access) return String_Access;