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,5544a67afca45ba2,start X-Google-Attributes: gid103376,public From: kql6708@is.nyu.edu (Ha Ha X) Subject: Trouble w/ End_Error exception in Integer_Text_IO Date: 1997/06/16 Message-ID: <33a4a1c5.2804336@netnews.worldnet.att.net>#1/1 X-Deja-AN: 248718795 Organization: AT&T WorldNet Services Newsgroups: comp.lang.ada Date: 1997-06-16T00:00:00+00:00 List-Id: I've been having a lot of trouble with an irritating feature of Ada.Integer_Text_IO's End_Error exception. When using the Get() procedure, if the user enters a manual EOF from the keyboard (^D in Unix, or ^Z in DOS), Get() raises End_Error. This is, I suppose, intended to prevent people from reading past EOF in a text file. Fine. However, when I am getting input from user with Integer_Text_IO, I want to just clear that EOF off the input stream, put an error message, and loop back for new input. Unfortunately, End_Error does not clear EOF off the stream. Furthermore, Skip_Line's defined behavior is to raise End_Error if you attempt to skip EOF. The net result is that when a user hits ^Z by accident, I am forced to bomb out of the program with an exception. I've searched in the AARM for a solution, to no avail. This problem extends to virtually every input procedure in Ada.Text_IO. So, in short, my question is: how can EOF be cleared off the standard input stream? I'm using GNAT 3.05 for MS-DOS, if that's any help. Thanks in advance. ~k.lee kql6708@is.nyu.edu