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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a0c:fc42:: with SMTP id w2mr12741657qvp.77.1588856430691; Thu, 07 May 2020 06:00:30 -0700 (PDT) X-Received: by 2002:aca:c5c7:: with SMTP id v190mr6087945oif.175.1588856430471; Thu, 07 May 2020 06:00:30 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 7 May 2020 06:00:30 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=89.8.134.43; posting-account=uulyKwoAAAA86DO0ODu--rZtbje8Sytn NNTP-Posting-Host: 89.8.134.43 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <58b57daf-852c-4ff1-a185-e7b23c698cc6@googlegroups.com> Subject: Re: How can one record component be local and another not? From: Egil H H Injection-Date: Thu, 07 May 2020 13:00:30 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:58626 Date: 2020-05-07T06:00:30-07:00 List-Id: On Thursday, May 7, 2020 at 12:15:07 PM UTC+2, Niklas Holsti wrote: > On 2020-05-07 12:07, J-P. Rosen wrote: > > Le 06/05/2020 =C3=A0 19:30, Niklas Holsti a =C3=A9crit=C2=A0: > >> Note that, although "Test" here is no doubt the program's main > >> subprogram and so its call (assuming it is not recursive) lasts almost > >> as long as the execution of the program, the compiler does not make us= e > >> of this fact to determine the life-times of types and objects in "Test= ". > >=20 > > No, tasks declared in library packages could survive the main program. >=20 > And the environment task, yes. I know, which is why I said "almost as=20 > long as". The example program we were discussing had no library tasks. >=20 > > You may even have a "begin null; end" main program, and do all the work > > with library tasks.=20 >=20 > Yes, but not for this example program. But I should have been clearer, I= =20 > admit. >=20 > > Moreover, there is no rule in Ada that makes the main subprogram "speci= al". >=20 > Indeed, I was trying to make that point, but evidently not clearly enough= . >=20 > Sometimes this is a little annoying, where one wants to write a small=20 > program with some library-level stuff, but must then separate those=20 > declarations into a package. An option to have a "main package" instead= =20 > of a "main subprogram" would sometimes be neat (and now somebody will=20 > tell me that Gnat already has that...) >=20 > --=20 > Niklas Holsti > Tidorum Ltd > niklas holsti tidorum fi > . @ . Since you asked so nicely... Sort of,=20 -z No main subprogram. Bind and link the program even if the unit name given o= n the command line is a package name. The resulting executable will execute= the elaboration routines of the package and its closure, then the finaliza= tion routines. I believe that's needed for the DSA? --=20 ~egilhh