comp.lang.ada
 help / color / mirror / Atom feed
From: Jeff Carter <jrcarter@acm.org>
Subject: Re: End_Of_File does not work as expected...
Date: 2000/11/25
Date: 2000-11-25T00:00:00+00:00	[thread overview]
Message-ID: <3A1FF75A.F02C2DCD@acm.org> (raw)
In-Reply-To: f8unv8.tq2.ln@127.0.0.1

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:
> --<snip>--
> dddddd
> 
> --<snip>--
> 
> 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




  reply	other threads:[~2000-11-25  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-24 23:42 End_Of_File does not work as expected Mika Fischer
2000-11-25  5:14 ` Jeff Carter
2000-11-25  0:00   ` Mika Fischer
2000-11-25  0:00     ` Jeff Carter [this message]
2000-11-26  0:00 ` Mats Weber
2000-11-26  0:00   ` Jeff Carter
2000-11-26  0:00     ` Mats Weber
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox