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-7-bit X-Google-Thread: 103376,f6ee8ca03c176d76 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-13 13:08:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!postnews1.google.com!not-for-mail From: adam@irvine.com (Adam Beneschan) Newsgroups: comp.lang.ada Subject: Re: stupid question: how can I finish a program? Date: 13 Aug 2002 13:08:07 -0700 Organization: http://groups.google.com/ Message-ID: References: NNTP-Posting-Host: 66.126.103.122 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1029269287 7341 127.0.0.1 (13 Aug 2002 20:08:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 13 Aug 2002 20:08:07 GMT Xref: archiver1.google.com comp.lang.ada:27985 Date: 2002-08-13T20:08:07+00:00 List-Id: "David C. Hoos" wrote in message news:... > In the main program procedure, "return" will do it. If you're not in the main program, a possibility is to define an exception Fatal_Error_Detected or something like that in a library package; then "raise Fatal_Error_Detected" can be used at points when you want to exit the program. In the main program, add an exception handler: begin ... exception when Fatal_Error_Detected => null; -- OR you can add cleanup code if necessary end Main_Program; Also, if there's any other procedure in the program in which you want to perform cleanup code before exiting, you can add an exception handler to the procedure: exception when Fatal_Error_Detected => raise; > > hi, > > Is there a function which quit/exit/end a program? -> whitout using > > the signals (like SIGINT ... etc). > > Only a one-line function. > > thanks -- Adam