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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: Florian Weimer Subject: Re: What is wrong here? (Generic and controlled types) Date: 2000/04/03 Message-ID: <873dp3hv8x.fsf@deneb.cygnus.argh.org>#1/1 X-Deja-AN: 606194116 References: <38E871E6.8D9EBE71@lufmech.rwth-aachen.de> <8caebe$6us$1@nnrp1.deja.com> <8cahmn$apq$1@nnrp1.deja.com> Mail-Copies-To: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@cygnus.argh.org X-Trace: deneb.cygnus.argh.org 954787982 3350 192.168.1.2 (3 Apr 2000 18:53:02 GMT) Organization: Penguin on board User-Agent: Gnus/5.0804 (Gnus v5.8.4) Emacs/20.6 Mime-Version: 1.0 Reply-To: Florian Weimer NNTP-Posting-Date: 3 Apr 2000 18:53:02 GMT Newsgroups: comp.lang.ada Date: 2000-04-03T18:53:02+00:00 List-Id: Robert Dewar writes: | 29. package Real_Vectors is new Generic_Vectors(Real, Index, Zero); | | | >>> instantiation error at generic_vectors.ads:23 | >>> controlled type must be declared at the library level | >>> instantiation error at generic_vectors.ads:75 | >>> controlled type must be declared at the library level > P.S. it is hard to see how the GNAT message could be any > clearer, suggestions welcome! I didn't understand this message, either. AFAIK, the term "library level" is not mentioned in Cohen's book -- the one I used (at least, it's not listed in the index). The RM definition is easy to find, but it's not very easy to understand (you must already know the concept of "accessibility level"). Therefore, I think a message like "controlled type cannot be declared locally" is more helpful, although it gives less information (it doesn't say explicitly how to correct this error, but the original message does).