comp.lang.ada
 help / color / mirror / Atom feed
* Beginner Need help !
@ 1996-04-22  0:00 Andr�
  1996-04-23  0:00 ` Michael Levasseur
  1996-04-23  0:00 ` Joerg Rodemann
  0 siblings, 2 replies; 4+ messages in thread
From: Andr� @ 1996-04-22  0:00 UTC (permalink / raw)


Hello Ada programers,

A beginner need help !
I want to write (in text mode) at the end of a file.

I tought using Text_IO.Open(...) with an existing file opened in
OUT_FILE mode, the result of the following code should append to
the file ...
But in fact, the original file is replaced with the new one !

What is wrong with this code ???

Thank you (excuse my english expression),
Andr� Baril  <bbp_abar@gig.net>


With Text_IO;
Procedure FileTest IS
Package IO_INT IS NEW Text_IO.Integer_IO(Num => Integer);

File_A : Text_IO.File_Type;
Line   : String(1..6) := "Line :";
Number : Natural;

Begin
   -- In this exemple the file, "b:\file_a.txt" should exit ...
   Text_IO.Open(File_A, Text_IO.Out_File, "b:\File_A.txt");

   FOR i IN 1..10 LOOP
      Text_IO.Put(File_A, Line);
      IO_INT.Put(File_A, i, 4);
      Text_IO.New_Line(File_A);
   END LOOP;

   Text_IO.Close(File_A);
End FileTest;




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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-04-22  0:00 Beginner Need help ! Andr�
1996-04-23  0:00 ` Michael Levasseur
1996-04-23  0:00   ` Ledru#m#_Pascal
1996-04-23  0:00 ` Joerg Rodemann

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