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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e94a7e4f6f888766 X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: Self-referential types Date: 1999/10/13 Message-ID: <7u246o$nr8$1@nnrp1.deja.com>#1/1 X-Deja-AN: 536231041 References: <7ttb4a$8mq$1@nnrp1.deja.com> <3802597B.9205AEE8@averstar.com> <7tvgud$qh7$1@nnrp1.deja.com> <3803bd26_4@news1.prserv.net> X-Http-Proxy: 1.0 x25.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Oct 13 14:16:07 1999 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.6 [en] (WinNT; I) Date: 1999-10-13T00:00:00+00:00 List-Id: In article <3803bd26_4@news1.prserv.net>, "Matthew Heaney" wrote: > In article <7tvgud$qh7$1@nnrp1.deja.com> , Ted Dennison > wrote: > > > I think what was confusing me was that I'm used to thinking about > > accessability levels in record *objects*, not types. > > But it *is* an object. Inside the declaration of a limited type T, the > expression T'Access refers to the "current instance" of the type. But the accessablity problem exists because it is a *type* declaration, not an object declaration. If we were talking about an object declaration, its lifetime would be the same as that of the access type, and there would be no problem. > > But I can't speak for what was confusing Cohen. :-) > > I don't understand why you have a smiley there. Are you saying > there's a mistake in Ada As A 2nd Language? If so, on what page? > Perhaps there is just a misunderstanding about what Norm was saying. To quote from my original posting: Below is a code sample that is taken directly from Cohen's AAASL, section 11.8.3: I'm looking at a copy of the second edition. Page numbers can vary in different printings. But in my copy this part of 11.8.3 is on page 491. My suspicion is that he got bit by using an early version of Gnat to compile his examples. I have a very foggy memory that accessability checks possibly weren't put into Gnat until late '96 or so (I remember a minor brouhaha resulting from a lot of incorrectly coded Ada95 sources suddenly breaking on Gnat users). His book is copyrighted 1996. -- T.E.D. Sent via Deja.com http://www.deja.com/ Before you buy.