CONTR47@NOSC-TECR.ARPA (11/26/87)
-- 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 .