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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2e69f8b2b50371a6 X-Google-Attributes: gid103376,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: End_Of_Line, End_Of_File Date: 1996/12/10 Message-ID: #1/1 X-Deja-AN: 203269586 references: organization: The Mitre Corp., Bedford, MA. newsgroups: comp.lang.ada Date: 1996-12-10T00:00:00+00:00 List-Id: In article dewar@merv.cs.nyu.edu (Robert Dewar) writes: > Well GNAT is doing exactly what the Ada 95 reference manual > requires. What you are really discovering is that Text_IO is not > an easy tool for this sort of programming. I recommend you use > Stream_IO instead, then you know exactly what you are reading. True. However, if you need to be using Text_IO for other reasons. End_of_File is true if the next thing in the logical file is an end of file, or if there is a (logical again, not physical) sequence of end of line, end of page, end of file. If you read past the (virtual) line terrminator at the end of the file, then you have also read past an end of page, so the line number is now 1. It really is tricky to implement this on a system so that there are no "junk" characters in a file, and it is even tougher to copy a file using just Text_IO, but it can be done. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...