comp.lang.ada
 help / color / mirror / Atom feed
* Simple Stream_IO question
@ 1996-10-21  0:00 John Raquet
  1996-10-21  0:00 ` Robert Dewar
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: John Raquet @ 1996-10-21  0:00 UTC (permalink / raw)




I'm trying to use Streams.Stream_IO to read/write multiple record types 
from a single file.  I know it's simple to do, but I can't 
figure out how to do it.  

If someone could show me what I'm doing wrong in the following code 
sample I'd appreciate it:

-----------------
with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO;

procedure Foo is

   F : Float;
   I : Integer;

   File : File_Type;
   
begin

   Open(File, In_File, "foo.adb");

   Float'Read(File, F);
   Integer'Read(File, I);

   Close(File);

end Foo;


---------------------------------------------------------
John F. Raquet                   jfraquet@acs.ucalgary.ca
Dept of Geomatics Engineering       Phone: (403) 220-7378
University of Calgary                 Fax: (403) 284-1980
---------------------------------------------------------






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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-10-21  0:00 Simple Stream_IO question John Raquet
1996-10-21  0:00 ` Robert Dewar
1996-10-22  0:00 ` Norman H. Cohen
1996-10-22  0:00 ` John English

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