comp.lang.ada
 help / color / mirror / Atom feed
* Streams and files
@ 2002-10-14  7:39 Sim Con
  2002-10-14  8:34 ` Sim Con
  0 siblings, 1 reply; 4+ messages in thread
From: Sim Con @ 2002-10-14  7:39 UTC (permalink / raw)


Hello! I'd like to write in a file a record and print that file taking
the data's in the record form. I see that these things can be done in
ada using streams but i can't find on the net a good source for learn
how to use it. One problem i have is this:

Ada.Streams.Stream_Io.create(file,out_file,"db.txt");
Stream:=Ada.Streams.Stream_Io.Stream(File);
while not Ada.Streams.Stream_Io.end_of_file(file) loop
....

i receive a mode_error when it process the while line , any help? Thanx
in advance ^_^


-- 
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG



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

* Re: Streams and files
@ 2002-10-14  8:30 Grein, Christoph
  0 siblings, 0 replies; 4+ messages in thread
From: Grein, Christoph @ 2002-10-14  8:30 UTC (permalink / raw)


> Ada.Streams.Stream_Io.create(file,out_file,"db.txt");
> Stream:=Ada.Streams.Stream_Io.Stream(File);
> while not Ada.Streams.Stream_Io.end_of_file(file) loop

End_of_File is valid for an in_file only.



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

* Re: Streams and files
  2002-10-14  7:39 Streams and files Sim Con
@ 2002-10-14  8:34 ` Sim Con
  2002-10-15  2:02   ` Eric G. Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Sim Con @ 2002-10-14  8:34 UTC (permalink / raw)


little add-on question: can i open a file in out_mode and then use the
while end_of_file loop on that ? thanx!!


-- 
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG



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

* Re: Streams and files
  2002-10-14  8:34 ` Sim Con
@ 2002-10-15  2:02   ` Eric G. Miller
  0 siblings, 0 replies; 4+ messages in thread
From: Eric G. Miller @ 2002-10-15  2:02 UTC (permalink / raw)


In <49b752211ac11632e3f829848b2e826c.110780@mygate.mailgate.org>, Sim Con wrote:

> little add-on question: can i open a file in out_mode and then use the
> while end_of_file loop on that ? thanx!!

Ask yourself, "When would the End_Of_File condition be true on a file
opened for writing?"



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

end of thread, other threads:[~2002-10-15  2:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-14  7:39 Streams and files Sim Con
2002-10-14  8:34 ` Sim Con
2002-10-15  2:02   ` Eric G. Miller
  -- strict thread matches above, loose matches on Subject: below --
2002-10-14  8:30 Grein, Christoph

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