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 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!ames!ucbcad!ucbvax!NOSC-TECR.ARPA!CONTR47 From: CONTR47@NOSC-TECR.ARPA Newsgroups: comp.lang.ada Subject: exporting "=" problem, Dec-Alsys conflict on legality Message-ID: <8711261906.AA26132@ajpo.sei.cmu.edu> Date: Thu, 26-Nov-87 13:13:43 EST Article-I.D.: ajpo.8711261906.AA26132 Posted: Thu Nov 26 13:13:43 1987 Date-Received: Sun, 29-Nov-87 20:38:05 EST Sender: usenet@ucbvax.BERKELEY.EDU Organization: The ARPA Internet List-Id: -- Code which compiled ok on Dec Ada was ported to Alsys Ada on PC -- and choked as indicated. What follows was heavily elided for --brevity and double checked that Dec Ada still said it is ok. -- Which is correct, Dec? Alsys? neither? both? -- --sam harbaugh -- generic SIZE : POSITIVE; package GENERIC_STRINGS is type VARYING_STRING_TYPE is private; -- This is the inner generic package that is used to make the -- VARYING_STRING operators visible. generic package OPERATORS is function "=" (LEFT : VARYING_STRING_TYPE; RIGHT : VARYING_STRING_TYPE) return BOOLEAN renames GENERIC_STRINGS."="; end OPERATORS; private type VARYING_STRING_TYPE is record LENGTH : NATURAL := 0; end record; end GENERIC_STRINGS; --------------------------------------- package body GENERIC_STRINGS is end GENERIC_STRINGS; ---------------------------------- with GENERIC_STRINGS; package STRINGS is new GENERIC_STRINGS (132); ---------------------------------- with STRINGS; package STRING_OPERATORS is new STRINGS.OPERATORS; ---------------------------------- with STRINGS; with STRING_OPERATORS; use STRING_OPERATORS; procedure L is PDL : STRINGS.VARYING_STRING_TYPE; begin if PDL = PDL then null; end if; end L; --34 if PDL = PDL then null; end if; -- ^_^ -- 1 1 --1 :**IDE This operation is not available for the type VARYING_STRING_TYPE --since it is not directly visible. Note that direct visibility might -- be achieved either by inserting a use clause for STRINGS, or by -- using a function call of the operator prefixed by STRINGS .