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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e219d94b946dfc26 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news1.google.com!news.germany.com!newsfeed.freenet.de!news.osn.de!diablo1.news.osn.de!noris.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada.Command_Line and wildcards Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <45dcaed8_6@news.bluewin.ch> <1172132169.423514.271890@s48g2000cws.googlegroups.com> <45E1B7AA.30804@obry.net> Date: Sun, 25 Feb 2007 17:44:55 +0100 Message-ID: <1dpvltpykld8r$.1rn2ewhc0itjt$.dlg@40tude.net> NNTP-Posting-Date: 25 Feb 2007 17:44:55 CET NNTP-Posting-Host: 59de6a47.newsspool4.arcor-online.net X-Trace: DXC=>PU_ihJR;B_c4IUK On Sun, 25 Feb 2007 17:22:02 +0100, Pascal Obry wrote: > Robert A Duff a �crit : >> Indeed, that is a serious flaw in the design of Ada. >> >> By the way, Ada 2005 has a function Get_Line that returns type String. > > Which is a dubious feature if you asked me as you do not control the > amount of stack space used by the returned object. This can easily lead > to stack overflow, strange for Ada which aim to be on the safe side. That should be no problem under two conditions: 1. A failure to allocate the result shall not destroy the program and the task. Get_Line should propagate an exception which could be handled in a reasonable way. 2. The failure should leave the file in a definite state and the data already read should be recoverable. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de