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,14aa27db81ce3b40 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!p4g2000vba.googlegroups.com!not-for-mail From: reinkor Newsgroups: comp.lang.ada Subject: Re: How to exit an Ada program with (unix shell) error code? Date: Mon, 4 May 2009 02:47:34 -0700 (PDT) Organization: http://groups.google.com Message-ID: <44f8caef-7832-4492-89a5-074891e413ad@p4g2000vba.googlegroups.com> References: <49ba30c9-a1e6-4346-8618-d256f87ac301@s31g2000vbp.googlegroups.com> <87ws8xkz0y.fsf@willow.rfc1149.net> <95866b61-f7e4-482d-8368-8b86528af578@b1g2000vbc.googlegroups.com> <10acae13-98dc-48da-9de4-9c01ea07abd4@g19g2000vbi.googlegroups.com> NNTP-Posting-Host: 193.156.99.217 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1241430454 25909 127.0.0.1 (4 May 2009 09:47:34 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 4 May 2009 09:47:34 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p4g2000vba.googlegroups.com; posting-host=193.156.99.217; posting-account=bPTmZAoAAAC_6HP9XLKB9aAAxBa6BuOR User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.64 (X11; Linux x86_64; U; en) Presto/2.1.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5676 Date: 2009-05-04T02:47:34-07:00 List-Id: On 4 Mai, 11:31, Ludovic Brenta wrote: > reinkor wrote on comp.lang.ada: > > > Thanks, but how I terminate the program in a "natural" way > > (without using goto or "raise exception") ? > > Simply allow the execution to reach the "end;" of the main subprogram. > > with Ada.Command_Line; > procedure Exit_With_False is > begin > =A0 =A0Ada.Command_Line.Set_Exit_Status (1); -- False, in shell terms > end Exit_With_False; -- nothing else required > > -- > Ludovic Brenta. OK, using "return" ? reinert