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-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!z19g2000vbz.googlegroups.com!not-for-mail From: Martin Newsgroups: comp.lang.ada Subject: Re: How to exit an Ada program with (unix shell) error code? Date: Mon, 4 May 2009 02:54:04 -0700 (PDT) Organization: http://groups.google.com Message-ID: <750c47f0-fac9-4e33-85d4-7e63968bd2df@z19g2000vbz.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> <44f8caef-7832-4492-89a5-074891e413ad@p4g2000vba.googlegroups.com> NNTP-Posting-Host: 81.157.54.194 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1241430844 26204 127.0.0.1 (4 May 2009 09:54:04 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 4 May 2009 09:54:04 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z19g2000vbz.googlegroups.com; posting-host=81.157.54.194; posting-account=g4n69woAAACHKbpceNrvOhHWViIbdQ9G User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.10) Gecko/2009042315 Firefox/3.0.10,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5677 Date: 2009-05-04T02:54:04-07:00 List-Id: On May 4, 10:47=A0am, reinkor wrote: > 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 No need for a return. But remember to ensure any tasks have completed too. Cheers -- Martin