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 autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!IBM.COM!NCOHEN From: NCOHEN@IBM.COM ("Norman H. Cohen") Newsgroups: comp.lang.ada Subject: Question about Ada renaming... Message-ID: <9103201431.AA27295@ajpo.sei.cmu.edu> Date: 20 Mar 91 14:04:24 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet List-Id: Fred Stluka asked whether the type marks A.INT and AAA.INT, where A is a renaming of package AAA, should be considered to conform. According to Ada 83 rules, they should not. RM paragraphs 6.3.1(5,6) state: 5 Two subprogram specifications are said to _conform_ if, apart from comments and the above allowed variations, both specifications are formed by the same sequence of lexical elements, and corresponding lexical elements are given the same meaning by the visibility and overloading rules. 6 Conformance is likewise defined for formal parts, discriminant parts, and type marks (for deferred constants and for actual parameters that have the form of a type conversion (see 6.4.1)). Paragraph 6 states that conformance of type marks is given by the same rules as conformance of subprogram specifications, namely those in paragraph 5. Paragraph 5 requires identical sequences of lexical elements (which "A.INT" and "AAA.INT" clearly are not) except for the "above allowed variations" described in paragraphs 2-4. These variations allow numeric literals to conform to differently written but equivalent numeric literals (e.g. 40960, 40_960, 4096E1, 16#A000#, 16#A#E3), expanded names to conform to corresponding simple names (e.g. INT and A.INT), and operator symbols to conform to differently capitalized operator symbols (e.g. "AND", "And", and "and"). They do not allow a name to conform to another name, declared by a renaming declaration to denote the same entity. Conformance is not transitive: Though A.INT conforms to INT and INT conforms to AAA.INT, A.INT does not conform to AAA.INT.