From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, WEIRD_PORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dfe1c08e956f971a X-Google-Attributes: gid103376,public From: stiletto@ryuji.net Subject: Reading a text file Date: 2000/10/08 Message-ID: #1/1 X-Deja-AN: 678958481 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr05-en0.news.prodigy.com 971016272 3682163 209.255.51.170 (8 Oct 2000 14:44:32 GMT) Organization: Prodigy http://www.prodigy.com NNTP-Posting-Date: 8 Oct 2000 14:44:32 GMT Newsgroups: comp.lang.ada Date: 2000-10-08T14:44:32+00:00 List-Id: 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;