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.1 required=5.0 tests=BAYES_20,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!cme!durer!leake From: leake@cme.nist.gov (Stephe Leake) Newsgroups: comp.lang.ada Subject: Re: Exiting a simple program in Ada Message-ID: Date: 11 Jul 89 14:03:46 GMT References: <3013@wpi.wpi.edu> Sender: news@cme.nbs.gov Distribution: usa Organization: National Institute of Standards and Technology In-reply-to: tfrancis@wpi.wpi.edu's message of 27 Jun 89 16:08:19 GMT List-Id: you can use abort only if you know the name of the task. Since the "main" task of an Ada program has no name, this doesn't work. You could declare one task, and have it run the program. A cleaner way is to define an exception; say KILL_MAIN_PROGRAM. Then provide one exception handler for it in the top level of the main program; raising the exception at any point "jumps" to the exception handler, which can cleanup and exit. What variables are set, and why? They need to be global in this instance. -- Stephe Leake (301) 975-3431 leake@cme.nbs.gov National Institute of Standards and Technology (formerly National Bureau of Standards) Rm. B-124, Bldg. 220 Gaithersburg, MD 20899