comp.lang.ada
 help / color / mirror / Atom feed
From: stiletto@ryuji.net
Subject: Reading a text file
Date: 2000/10/08
Date: 2000-10-08T14:44:32+00:00	[thread overview]
Message-ID: <MPG.1449afb7d3cdd3a498968b@news.prodigy.net> (raw)


Hello All!

How can I read text file?  Following program is supposed to read a text 
file and print out the contents of the file, but I got following error 
messages.

Thanks in advance

test.adb:13:01: "Read" is not visible
test.adb:13:01: non-visible (private) declaration at a-textio.ads:348
test.adb:13:01: non-visible declaration at a-stream.ads:58
gnatmake: "test.adb" compilation error


with Ada.Text_IO;
use Ada.Text_IO;

procedure test is
Data_File : File_Type;
Result_File : File_Type;
St : String(1..100);
begin

Open(Data_File, In_File, "infile");

while not End_Of_File(Data_File) loop
  Read(Data_File, St);
  Put_Line(St);
end loop;

end test;




             reply	other threads:[~2000-10-08  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-08  0:00 stiletto [this message]
2000-10-08  0:00 ` Reading a text file Mathias Dolidon
2000-10-08  0:00   ` Marin David Condic
  -- strict thread matches above, loose matches on Subject: below --
2000-10-08  0:00 stiletto
2000-10-06  0:00 ` DPH
2000-10-06  0:00 ` DPH
replies disabled

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