From: John Raquet <jfraquet@acs.ucalgary.ca>
Subject: Simple Stream_IO question
Date: 1996/10/21
Date: 1996-10-21T00:00:00+00:00 [thread overview]
Message-ID: <Pine.LNX.3.91.961021132826.300A-100000@e229b-1.ensu.ucalgary.ca> (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
---------------------------------------------------------
next reply other threads:[~1996-10-21 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-10-21 0:00 John Raquet [this message]
1996-10-21 0:00 ` Simple Stream_IO question Robert Dewar
1996-10-22 0:00 ` Norman H. Cohen
1996-10-22 0:00 ` John English
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox