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: a07f3367d7,14aa27db81ce3b40 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!g19g2000vbi.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: How to exit an Ada program with (unix shell) error code? Date: Mon, 4 May 2009 02:31:03 -0700 (PDT) Organization: http://groups.google.com Message-ID: <10acae13-98dc-48da-9de4-9c01ea07abd4@g19g2000vbi.googlegroups.com> References: <49ba30c9-a1e6-4346-8618-d256f87ac301@s31g2000vbp.googlegroups.com> <87ws8xkz0y.fsf@willow.rfc1149.net> <95866b61-f7e4-482d-8368-8b86528af578@b1g2000vbc.googlegroups.com> NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1241429463 22916 127.0.0.1 (4 May 2009 09:31:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 4 May 2009 09:31:03 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: g19g2000vbi.googlegroups.com; posting-host=153.98.68.197; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5675 Date: 2009-05-04T02:31:03-07:00 List-Id: 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 Ada.Command_Line.Set_Exit_Status (1); -- False, in shell terms end Exit_With_False; -- nothing else required -- Ludovic Brenta.