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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!mcvax!kth!draken!tut!hydra!hylka!ylarotiala From: ylarotiala@cc.helsinki.fi Newsgroups: comp.lang.ada Subject: END_ERROR on Text_Io.Get Message-ID: <2445@cc.helsinki.fi> Date: 1 Mar 89 21:56:44 GMT Organization: University of Helsinki Computing Centre List-Id: I wrote a piece of code: WHILE NOT Text_Io.End_Of_File(File) LOOP Text_Io.Get(File,C); ... END LOOP; I believed that this would just read the File character by character but I was wrong. Tests gave results: 1) A file with two lines, text on both >first line >second line Everything is just fine; my program sees the file, reads it and finds the end of it. 2) A file with three lines, the third beign empty >first line >second line > This time Text_Io.Get raises END_ERROR. LRM(14.3.4) says about END_OF_FILE: "Returns TRUE if file terminator is next, or if the combination of a line, a page, and a file terminator is next; otherwise returns FALSE." Does this mean that the combination "line and file terminator" is not detected? Why is the exception raised? A. Yl{-Rotiala ylarotiala @cc.helsinki.fi - Helsinki, Finland