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,d121cc76e012fcca X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: Library Level Question Date: 1999/03/08 Message-ID: #1/1 X-Deja-AN: 452504183 Sender: matt@mheaney.ni.net References: <36c853cb.0@news.pacifier.com> NNTP-Posting-Date: Mon, 08 Mar 1999 01:18:35 PDT Newsgroups: comp.lang.ada Date: 1999-03-08T00:00:00+00:00 List-Id: Robert A Duff writes: > The explanation below is not quite right. "Library level" means > anything whose lifetime is essentially forever -- ie it lasts until the > end of the whole program. A variable (or anything else) can be nested > inside as many packages as you like, and it lasts "forever". That's > library level. OTOH, if it's nested inside a procedure, function, or > task, then it's not at library level -- its lifetime ends when the > containing procedure returns, or whatever. > > I think "library level" was a poor choice of terms, because it makes > people think of "library unit", which isn't quite right. After I posted that response, I regretted it, because I knew it wasn't right. I was thinking of a few years back when I was using the VMS Ada compiler. They had a restriction about the location of procedures that could be exported: they had to be at "library level" (DEC's term). What that meant to them was that this was legal: package P is procedure Op (O : T); pragma Export (Op); end P; But this was illegal: package P is package Nested is procedure Op (O : T); pragma Export (Op); end Nested; end P; Ada95 has finally solved these problems; I just need to get my terms straight.