comp.lang.ada
 help / color / mirror / Atom feed
* Re: Generic Put Statement
  1996-04-19  0:00 Generic Put Statement Daniel Tomalesky
@ 1996-04-19  0:00 ` Stephen A. Leake
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen A. Leake @ 1996-04-19  0:00 UTC (permalink / raw)


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




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

* Generic Put Statement
@ 1996-04-19  0:00 Daniel Tomalesky
  1996-04-19  0:00 ` Stephen A. Leake
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Tomalesky @ 1996-04-19  0:00 UTC (permalink / raw)


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

Dan Tomalesky




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

end of thread, other threads:[~1996-04-19  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-04-19  0:00 Generic Put Statement Daniel Tomalesky
1996-04-19  0:00 ` Stephen A. Leake

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