comp.lang.ada
 help / color / mirror / Atom feed
From: DPH <kgclg15@kg.hsanet.net>
Subject: Re: Reading a text file
Date: 2000/10/06
Date: 2000-10-06T00:00:00+00:00	[thread overview]
Message-ID: <39DDEDF4.6871DB3D@kg.hsanet.net> (raw)
In-Reply-To: MPG.144a5354d495865998968c@news.prodigy.net

Note that the procedure "Read" is not a part of Ada.Text_IO.  That is why
it is not visible.  You probably want the procedure "Get" which is in
Ada.Text_IO.

Dave Head

stiletto@ryuji.net wrote:

> 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-06  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-08  0:00 Reading a text file stiletto
2000-10-06  0:00 ` DPH [this message]
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
replies disabled

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