* Re: Desperatly Seeking Streams!
[not found] <01bc5ee4$53717470$180010ac@glen>
@ 1997-05-12 0:00 ` Michael Paus
0 siblings, 0 replies; only message in thread
From: Michael Paus @ 1997-05-12 0:00 UTC (permalink / raw)
In <01bc5ee4$53717470$180010ac@glen> "Glenn Lambkin" wrote:
> I am trying to use stream packages in a small ada program,
> and I desperatly need information on how to use ada.streams.stream_io,
> to read an integer from a file which already exists.
Just open the file in the same way as you would do with Text_IO but use
the package Ada.Streams.Stream_IO instead.
declare
File : File_Type;
S : Stream_Access;
Value : Integer;
begin
Open (File, In_File, "My_File");
S := Stream (File);
Integer'Read (S, Value);
Close (File);
end;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-05-12 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <01bc5ee4$53717470$180010ac@glen>
1997-05-12 0:00 ` Desperatly Seeking Streams! Michael Paus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox