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,4bce46ddadaa9806 X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: What is wrong here? (Generic and controlled types) Date: 2000/04/04 Message-ID: #1/1 X-Deja-AN: 606624874 Sender: bobduff@world.uucp (Robert A Duff) References: <38E871E6.8D9EBE71@lufmech.rwth-aachen.de> <8caebe$6us$1@nnrp1.deja.com> <8cahmn$apq$1@nnrp1.deja.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 2000-04-04T00:00:00+00:00 List-Id: Robert Dewar writes: > P.S. it is hard to see how the GNAT message could be any > clearer, suggestions welcome! I'm not sure it's possible -- the accessibility rules seem to be inherently difficult to understand. We totally rewrote that section of the RM several times, and people found it confusing every time. I think the terminology we ended up with is just whatever it happened to be when the RM was done -- if we had had more time, we probably would have rewritten it again, without improvement. ;-) Part of the problem is that people don't think of the main procedure as being a real procedure -- its stack frame lasts more-or-less forever, just like library packages (unless you have tasks or a recursive main procedure, which is unlikely in a simple test program). But anyway, how about something like this: >>> instantiation error at generic_vectors.ads:75 >>> controlled type must be declared at the library level >>> Move instantiation out of procedure Main and into a library package. - Bob