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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,88e2699149e680f4,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-05 22:27:49 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: vashwath@rediffmail.com (prashna) Newsgroups: comp.lang.ada Subject: File IO problem Date: 5 Dec 2002 22:27:49 -0800 Organization: http://groups.google.com/ Message-ID: NNTP-Posting-Host: 203.90.88.230 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1039156069 30876 127.0.0.1 (6 Dec 2002 06:27:49 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 6 Dec 2002 06:27:49 GMT Xref: archiver1.google.com comp.lang.ada:31478 Date: 2002-12-06T06:27:49+00:00 List-Id: Hi all, Pls have a look at the following code with text_Io; use text_io; Procedure FILE_IO_DEMO is FILE_I, FILE_O : FILE_TYPE; S : STRING(1..80); Len : Integer; begin open (FILE_I, IN_FILE,"junk.txt"); create(FILE_O, OUT_FILE, "output.txt"); while END_OF_FILE(FILE_I) loop GET_LINE(FILE_I, S, Len); PUT_LINE(S(1..LEN)); PUT_LINE(FILE_O,S(1..Len)); end loop; end; The contents of the file junk.txt is lafeosbv qfowep p4gowb hfwevwpbv The program is creating output.txt but it contents are nil. Pls let me know if I am doing wrong.Any help will be appriciated.