comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: Program error from assignment??
Date: 1998/07/23
Date: 1998-07-23T00:00:00+00:00	[thread overview]
Message-ID: <EwIz8x.MFF.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: 6p5c9p$9qs$1@nnrp1.dejanews.com

dennison@telepath.com wrote:

: ...
: I tried this with a second compiler with the same result (Program_Error). So
: it looks like the language does define the main program to be at a lower
: accessability level than package specs. Personally I find that a bit weird,
: but I'm guessing the rationale is as follows:

The main subprogram is just like any other subprogram in Ada.
It can be recursive, called from multiple tasks, etc.
All subprograms are at a deeper level than the enclosing scope.

And even without weirdness like calling the main subprogram recursively,
it is definitely the case that the program as a whole is not done
just because the main subprogram returns.  Program termination does
not occur until all the library-level tasks terminate.  In fact,
it is possible for the main subprogram's body to be "null" and
have all of the interesting work happen in library-level tasks,
after the main subprogram returns.

: ...
:   2  Move the object declaration into a package spec somewhere. That gives it
: the exact same accessability level as the type. I like this solution better,
: even if the package has to be created specially for the job. (package
: Make_It_Run_Dammit is ...)

This is the right solution.

: T.E.D.

--
-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Burlington, MA  USA




  reply	other threads:[~1998-07-23  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-21  0:00 Program error from assignment?? dennison
1998-07-22  0:00 ` dennison
1998-07-22  0:00   ` dennison
1998-07-23  0:00     ` Tucker Taft [this message]
1998-07-23  0:00     ` Robert Dewar
1998-07-22  0:00   ` Robert Dewar
1998-07-22  0:00   ` David C. Hoos, Sr.
1998-07-22  0:00   ` Stephen Leake
1998-07-22  0:00     ` dennison
1998-07-22  0:00   ` Jean-Pierre Rosen
1998-07-22  0:00     ` dennison
1998-07-23  0:00       ` Jean-Pierre Rosen
1998-07-24  0:00         ` tedennison
1998-07-23  0:00       ` Robert Dewar
1998-07-23  0:00         ` dennison
1998-07-23  0:00   ` Dale Stanbrough
replies disabled

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