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,4bce46ddadaa9806 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: What is wrong here? (Generic and controlled types) Date: 2000/04/21 Message-ID: <8dqhkl$6vt$1@nnrp1.deja.com>#1/1 X-Deja-AN: 613880595 References: <38E871E6.8D9EBE71@lufmech.rwth-aachen.de> <8caebe$6us$1@nnrp1.deja.com> <8cahmn$apq$1@nnrp1.deja.com> <38FFFDEE.431A@li.net> X-Http-Proxy: 1.0 x21.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Fri Apr 21 21:36:22 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-04-21T00:00:00+00:00 List-Id: In article <38FFFDEE.431A@li.net>, Vincent Marciante wrote: > 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! > > 29. package Real_Vectors is new Generic_Vectors(Real, Index, Zero); > | > >>> instantiation error at generic_vectors.ads:23 > > >>> controlled type must be declared in a package > ^^^^^^^^^^^^ > >>> that is a library unit > ^^^^^^^^^^^^^^^^^^^^^^^^^^ > > Both "package" and "library unit" are in the ARM's index. Well so is "library level", and if we are going to use technical terms in the error messages we might as well use them accurately. A library level package is definitely NOT the same thing as a package that is a library unit, so your replacement is inaccurate. I don't mind considering replacing the formal correct existing message with an informal message that might not be quite as correct but is more informative, but surely it is not a good idea to replace it with a message using formal terms that is just wrong :-) The fact that something is in the index of the RM is really not good enough for two reasons: 1. There is no reason to expect beginning programmers to have the RM, and indeed every reason to expect them NOT to have it. 2. If they do have it, sending them off to the index of this document is often not likely to be as helpful as you think. But you can see the bind of choosing such messages, I suggested that the very familiar term "global" might be better, but Florian thinks that is equally obscure. Probably for really difficult messages like this you want an auxiliary wizard that can provide additional information at an appropriate level of sophistication -- we have envisioned such a tool for some time. I even have had a name for it which I thought up 8 years ago, GNOME - GNAT On-line Message Explainer. Of course we delayed too long implementing it, and now we can't use that name, so now we don't even have a name :-( Sent via Deja.com http://www.deja.com/ Before you buy.