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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1fd0fbf8527f0773 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-28 05:23:37 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!newsfeed.berkeley.edu!ucberkeley!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3A9CED0D.5C514170@earthlink.net> From: "Marc A. Criley" Organization: Quadrus Corporation X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: generic packages and dispatched operations References: <96r871$1g5g$1@news.kiev.sovam.com> <96vq2l$mqg$1@news.kiev.sovam.com> <970l92$18f$1@nh.pace.co.uk> <972rh2$26gk$1@news.kiev.sovam.com> <97gmv4$3cf$1@a1-hrz.uni-duisburg.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 28 Feb 2001 13:19:15 GMT NNTP-Posting-Host: 158.252.122.159 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 983366355 158.252.122.159 (Wed, 28 Feb 2001 05:19:15 PST) NNTP-Posting-Date: Wed, 28 Feb 2001 05:19:15 PST Xref: supernews.google.com comp.lang.ada:5335 Date: 2001-02-28T13:19:15+00:00 List-Id: Georg Bauhaus wrote: > 4. package CUpper is new Upper(Character); > | > >>> warning: instantiation of "upper" may raise Program_Error > >>> warning: missing pragma Elaborate_All for "upper" > > Don't rely on what I say, but cupper.ads looks like > a package spec (at least that is what gnatchop says) > but is just an instantiation, "new Upper(Character)". > Checking with the syntax given in RM 7.1(3) I'm missing > the "end", e.g.. > > So, with warnings on, you get more than a silent > compilation and some hints. Still I'm not sure > wether the code is correct. More votes? > No need to vote, here's the facts: A stand-alone instantiation is a perfectly legal Ada unit. For example, here's the entirety of the predefined Ada.Integer_Text_IO unit: --------------------------------------------- with Ada.Text_IO; package Ada.Integer_Text_IO is new Ada.Text_IO.Integer_IO (Integer); --------------------------------------------- As a matter of fact, even a "package renaming" is a legal unit--here's Text_IO: --------------------------------------------- with Ada.Text_IO; package Text_IO renames Ada.Text_IO; --------------------------------------------- Marc A. Criley Senior Staff Engineer Quadrus Corporation www.quadruscorp.com