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,bff0c2e09500f856 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-04 19:53:40 PST From: dale Newsgroups: comp.lang.ada Subject: Re: How do I end the program? Organization: rmit References: User-Agent: MT-NewsWatcher/3.0 (PPC) Date: Tue, 05 Feb 2002 13:52:19 +1000 Message-ID: NNTP-Posting-Host: dale.cs.rmit.edu.au X-Trace: itsawnews.its.rmit.edu.au 1012881140 dale.cs.rmit.edu.au (5 Feb 2002 14:52:20 +1100) Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.mel.connect.com.au!newshub1.rdc1.nsw.optushome.com.au!harbinger.cc.monash.edu.au!vrn.edu.au!131.170.8.40.MISMATCH!itsawnews.its.rmit.edu.au!dale Xref: archiver1.google.com comp.lang.ada:19619 Date: 2002-02-05T13:52:19+10:00 List-Id: starner@okstate.edu wrote: > How do I exit the program? It may seem like a silly question, but I'm > trying to exit from a function called from a callback written in C, so I > can't just return or raise an exception. glutMainLoop never returns, so > I can't run off the end of the main function. I used > GNAT.OS_Lib.OS_Exit. Is there a pure Ada alternative? No not really. One way of doing it is to define an exception... Quit_Program : Exception; then have a handler at the main program level.... exception when Quit_Program => null; end; Before you do that you can call Ada.Command_Line.Set_Exit_Status. Dale