comp.lang.ada
 help / color / mirror / Atom feed
From: William L Hayhurst <wlhst6+@pitt.edu>
Subject: Generics and I/O
Date: 1998/10/02
Date: 1998-10-02T00:00:00+00:00	[thread overview]
Message-ID: <Pine.GSO.3.96L.981002182724.301A-100000@unixs1.cis.pitt.edu> (raw)

Hi there.  I have a question about Generics and IO.  Given

generic
    type Item is private;
    package Foo is 
       -- ... --
       procedure Print is
           -- ... --
           Put( Item );
           -- ... --
       end Print;
    end Foo;

My compiler ( GNAT ) will flag the Put( Item ) as an error.
So if I instantiate foo as

declare
  -- ... --
  with Foo; use Foo;
  package Int_Foo is new Foo ( Item => Integer );
  use Int_Foo;

  -- ... -- 
end; 

and the Put( ) still won't work, even if a declare a new
Int_IO package in the scope of Foo::Print.  So do I have to
overload Put( ) inside package foo? 

Thanks in advance!

--Lyle






             reply	other threads:[~1998-10-02  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-02  0:00 William L Hayhurst [this message]
1998-10-03  0:00 ` Generics and I/O Niklas Holsti
1998-10-03  0:00 ` Dmitriy Anisimkov
1998-10-06  0:00 ` Robert I. Eachus
1998-10-07  0:00   ` Dale Stanbrough
replies disabled

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