comp.lang.ada
 help / color / mirror / Atom feed
From: sal714@rs710.gsfc.nasa.gov (Stephen A. Leake)
Subject: Re: Generic Put Statement
Date: 1996/04/19
Date: 1996-04-19T00:00:00+00:00	[thread overview]
Message-ID: <SAL714.96Apr19145615@rs710.gsfc.nasa.gov> (raw)
In-Reply-To: 317742B9.34FC@pitt.edu

In article <317742B9.34FC@pitt.edu> Daniel Tomalesky <grim+@pitt.edu> writes:

   I have to write a program where I have to use put statements in a 
   generic package.  Now how do I tell the generic package to use a put 
   statement for integer or float or character.  I tried to add a with 
   procedure put statement in the generic spec but when I wrote the 
   driver I couldn't instantiate the package put for integer. 

   The problem seems to be that put have multiple parameters depending 
   on which one you are using...is there a way around that for 
   generics?  Please mail me an answer if anyone has one.  Thanks

I've had this problem too; I wrote a generic array IO package. The
general solution is to write wrappers for the Text_IO functions, that
take the File and Item args, and use defaults for the rest.

The Ada code I wrote is available via my web page:

http://www710.gsfc.nasa.gov/~sal714/homepage.html

Look there for examples.

Happy instantiating :-)
-- 
Stephen Leake, NASA Goddard Space Flight Center
email: Stephen.Leake@gsfc.nasa.gov




      reply	other threads:[~1996-04-19  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-19  0:00 Generic Put Statement Daniel Tomalesky
1996-04-19  0:00 ` Stephen A. Leake [this message]
replies disabled

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