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.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!world!decwrl!wuarchive!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!sei!ajpo!dyer From: dyer@ajpo.sei.cmu.edu (Richard Dye) Newsgroups: comp.lang.ada Subject: Visibility in Embedded Packages Keywords: Visibility, Use Clause, Packages, Operators Message-ID: <718@ajpo.sei.cmu.edu> Date: 28 Oct 90 15:51:01 GMT List-Id: In the previous edition of Ada Letters, Bird wrote to Dear Ada that he liked to embed an operators package in his types packages so he could provide direct visibility to the infix operators without providing direct visibility to the types themselves (via a use clause). We've tried this on three different compilers and each compiler requires a different syntax to achieve the effect. My question to all the language lawyers is why? Which one is right? (The three compilers are Telesoft 1.3 and 1.4 self- hosted on Sun 3s and VAX ACS (Don't know the version.)) The code we tried is: package Standard_Types is Min_Integer : constant := -1 * (2 ** 31); Max_Integer : constant := (2 ** 31) -1; type Integer_Type is range Min_Integer .. Max_Integer; package Operators is function "+"(L,R : Integer_Type) return Integer_Type renames "+"; end Operators; end Standard_Types; The above works fine on the Telesoft 1.4. The Telesoft 1.3 requires: function "+"(L,R : Integer_Type) return Integer_Type renames Standard."+"; The VAX requires: function "+"(L,R : Integer_Type) return Integer_Type renames Standard_Types."+"; I'm working from memory so I may not have the correct associations between compilers and requirements but the three fixes were what we had to do. Dick Dick Dye CTA, Inc. M/S N8910 National Test Bed Falcon AFB, CO 80912-5000 (719) 380-2578 FAX: (719) 380-3100 (Put M/S N8910 on the first page) dyer@ajpo.sei.cmu.edu