comp.lang.ada
 help / color / mirror / Atom feed
* Generics and I/O
@ 1998-10-02  0:00 William L Hayhurst
  1998-10-03  0:00 ` Niklas Holsti
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: William L Hayhurst @ 1998-10-02  0:00 UTC (permalink / 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






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-10-07  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-02  0:00 Generics and I/O William L Hayhurst
1998-10-03  0:00 ` Niklas Holsti
1998-10-03  0:00 ` Dmitriy Anisimkov
1998-10-06  0:00 ` Robert I. Eachus
1998-10-07  0:00   ` Dale Stanbrough

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