comp.lang.ada
 help / color / mirror / Atom feed
From: leake@cme.nist.gov (Stephe Leake)
Subject: Re: Exiting a simple program in Ada
Date: 11 Jul 89 14:03:46 GMT	[thread overview]
Message-ID: <LEAKE.89Jul11100346@primus.cme.nist.gov> (raw)
In-Reply-To: tfrancis@wpi.wpi.edu's message of 27 Jun 89 16:08:19 GMT


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

      reply	other threads:[~1989-07-11 14:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1989-06-27 16:08 Exiting a simple program in Ada Krishan M Nainani
1989-07-11 14:03 ` Stephe Leake [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox