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,7f7e3d24b1fe22fd X-Google-Attributes: gid103376,public From: Jeff Carter Subject: Re: End_Of_File does not work as expected... Date: 2000/11/25 Message-ID: <3A1FF75A.F02C2DCD@acm.org>#1/1 X-Deja-AN: 697642416 Content-Transfer-Encoding: 7bit References: <3A1F4ABC.AB68A5C2@acm.org> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 975173470 158.252.122.224 (Sat, 25 Nov 2000 09:31:10 PST) Organization: EarthLink Inc. -- http://www.EarthLink.net MIME-Version: 1.0 NNTP-Posting-Date: Sat, 25 Nov 2000 09:31:10 PST Newsgroups: comp.lang.ada Date: 2000-11-25T00:00:00+00:00 List-Id: Mika Fischer wrote: > All I can see is this: > > | function End_Of_File return Boolean; > | > | (25) > | Operates on a file of mode In_File. Returns True if a file > | terminator is next, or if the combination of a line, a page, and a > | file terminator is next; otherwise returns False. > > which doesn't explain why that does not work in my program. Thus we can see that two line terminators at the end of the file will result in End_Of_File being False. The description of Get (Character) explains why it will raise End_Error in this situation. [concerning input from the console:] > Yeah, well. But if I read one character at once I would expect it to look > like this: > ---- > dddddd > > ---- > > Or has this got something to do with buffered output? I'll look this up. Get will probably wait for an entire line of input to be read and echoed by the OS before reading a character. If you need immediate input, you should probably be looking at Get_Immediate. -- Jeff Carter "Now go away or I shall taunt you a second time." Monty Python & the Holy Grail