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,369ed27a1a2dd2cb X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: QUIZ: To be or not to be (able to post) Date: 1997/09/30 Message-ID: #1/1 X-Deja-AN: 276696789 References: <60n3dm$fhi$1@gonzo.sun3.iaf.nl> Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-09-30T00:00:00+00:00 List-Id: In article <60n3dm$fhi$1@gonzo.sun3.iaf.nl>, Geert Bosch wrote: >OK, here is a nice question for all you Ada experts out there. >Why isn't the code below not legal? Or is it? If so, why? > > with Ada.Numerics.Elementary_Functions; > procedure Renaming is > > function Sin (F : Float) return Float; > > function Sin (X : Float'Base) return Float'Base > renames Ada.Numerics.Elementary_Functions.Sin; > > begin > null; > end Renaming; Isn't this a "co-resident homograph"? Float is a subtype of Float'Base, and subtypes can't be used to resolve ambiguity. Only types are part of a signiture, not subtypes. -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271