comp.lang.ada
 help / color / mirror / Atom feed
* Reading a text file
@ 2000-10-08  0:00 stiletto
  2000-10-06  0:00 ` DPH
  2000-10-06  0:00 ` DPH
  0 siblings, 2 replies; 6+ messages in thread
From: stiletto @ 2000-10-08  0:00 UTC (permalink / 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;




^ permalink raw reply	[flat|nested] 6+ messages in thread
* Reading a text file
@ 2000-10-08  0:00 stiletto
  2000-10-08  0:00 ` Mathias Dolidon
  0 siblings, 1 reply; 6+ messages in thread
From: stiletto @ 2000-10-08  0:00 UTC (permalink / 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;




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

end of thread, other threads:[~2000-10-08  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-08  0:00 Reading a text file stiletto
2000-10-06  0:00 ` DPH
2000-10-06  0:00 ` DPH
  -- strict thread matches above, loose matches on Subject: below --
2000-10-08  0:00 stiletto
2000-10-08  0:00 ` Mathias Dolidon
2000-10-08  0:00   ` Marin David Condic

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