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,a1a7a64f0d47e271 X-Google-Attributes: gid103376,public From: stt@henning.camb.inmet.com (Tucker Taft) Subject: Re: [Q]: Generic subprogram instantiation Date: 1996/07/11 Message-ID: #1/1 X-Deja-AN: 167820842 sender: news@inmet.camb.inmet.com (USENET news) x-nntp-posting-host: henning.camb.inmet.com references: organization: Intermetrics, Inc. newsgroups: comp.lang.ada Date: 1996-07-11T00:00:00+00:00 List-Id: Robert A Duff (bobduff@world.std.com) wrote: : In article , : Michael Bartz wrote: : > procedure sub_main is new sub_main(galois); : ^^^^^^^^ 1 ^^^^^^^^ 2 : The sub_main at 1 hides the outer sub_main, which you then illegally try : to reference at 2. Call the procedure something different from the : generic. (Note that generic procedures are NOT overloadable, unlike : procedures.) I hate to disagree with both Bob and Robert, but the procedure named "sub_main" is not introduced until *after* the generic instantiation in Ada 95. See RM95 8.2(2): ... except in the case of an overloadable declaration [like the above], in which case the immediate scope starts just after the place where the profile of the callable entity is determined (which is at the end of the _specification for the callable entity, or at the end of the generic_instantiation if an instance). So I believe this line should be accepted. : - Bob -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Cambridge, MA USA