comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: Generics and I/O
Date: 1998/10/06
Date: 1998-10-06T00:00:00+00:00	[thread overview]
Message-ID: <EACHUS.98Oct6185109@spectre.mitre.org> (raw)
In-Reply-To: Pine.GSO.3.96L.981002182724.301A-100000@unixs1.cis.pitt.edu


   Add the following:

   generic
       type Item is private;
--
       with procedure Put(I: in Item) is <>;
--
       package Foo is...

    Now if there is a visible Put procedure which matches the profile,
you are all set.  Otherwise you will have to pass it during the
instantiation explicity:

       with Ada.Integer_Text_IO;
       package Int_Foo is new Foo(Integer,Ada.Integer_Text_IO.Put);
--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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