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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2d56530d3025e324 X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Program error from assignment?? Date: 1998/07/23 Message-ID: #1/1 X-Deja-AN: 374043721 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: <6p5c9p$9qs$1@nnrp1.dejanews.com> Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1998-07-23T00:00:00+00:00 List-Id: 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