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,a0833bbed8752e1f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!proxad.net!193.252.118.146.MISMATCH!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Sender: obry@PASCAL Newsgroups: comp.lang.ada Subject: Re: variable length strings References: <1861614.TWv5A9FgVL@linux1.krischik.com> <4178e979_1@baen1673807.greenlnk.net> <1195374.UMjBCk7lO1@linux1.krischik.com> <1154613.ipZcUgduzp@linux1.krischik.com> <1174011.lJ1dcgRM3Q@linux1.krischik.com> <1098814048.280053@master.nyc.kbcfp.com> <10z8k19febkic.16ex86io5uvwi.dlg@40tude.net> From: Pascal Obry Organization: Home - http://perso.wanadoo.fr/pascal.obry User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Date: 27 Oct 2004 18:38:29 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: AVelizy-151-1-40-76.w82-120.abo.wanadoo.fr X-Trace: 1098895110 news.wanadoo.fr 3835 82.120.22.76:2619 X-Complaints-To: abuse@wanadoo.fr Xref: g2news1.google.com comp.lang.ada:5776 Date: 2004-10-27T18:38:29+02:00 List-Id: "Dmitry A. Kazakov" writes: > But the existing Get_Line does not reaches the goal either. Normally it is > used with the buffer allocated on the stack. So it is the stack again. That's wrong! procedure Get_Line(Item : out String; Last : out Natural); The buffer is bounded in this case, it's up to you to read a chunk of data (using a small buffer on the stack) and do whatever is needed with it. So I see not problem with the standard Get_Line. I never said that you can't use the stack, just that using a buggy Get_Line implementation as proposed here could heat too much stack space and is therefore unsafe. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595