From: Andr� <bbp_abar@gig.net>
Subject: Beginner Need help !
Date: 1996/04/22
Date: 1996-04-22T00:00:00+00:00 [thread overview]
Message-ID: <317BA52A.18C4@gig.net> (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;
next reply other threads:[~1996-04-22 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-04-22 0:00 Andr� [this message]
1996-04-23 0:00 ` Beginner Need help ! Michael Levasseur
1996-04-23 0:00 ` Ledru#m#_Pascal
1996-04-23 0:00 ` Joerg Rodemann
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox