comp.lang.ada
 help / color / mirror / Atom feed
From: CONTR47@NOSC-TECR.ARPA
Subject: exporting "=" problem, Dec-Alsys conflict on legality
Date: Thu, 26-Nov-87 13:13:43 EST	[thread overview]
Date: Thu Nov 26 13:13:43 1987
Message-ID: <8711261906.AA26132@ajpo.sei.cmu.edu> (raw)

-- 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 .   

                 reply	other threads:[~1987-11-26 18:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox