Re: [fpc-pascal] eof strangeness

2006-05-03 Thread Jonas Maebe
On 3 mei 2006, at 06:37, John Coppens wrote: I see your reasoning, but I do not understand why eof doesn't return always. The eof is not a 'wait for eof', but a test. If we're _not_ at the end of the file, the program should return with false, at least how I understand it. It is not possib

Re: [fpc-pascal] eof strangeness

2006-05-02 Thread John Coppens
On Tue, 02 May 2006 14:42:00 -0400 Bob Richards <[EMAIL PROTECTED]> wrote: > John Coppens wrote: > > > program testeof; > > > > begin > > if eof then > > writeln('EOF found') > > else > > writeln('No EOF found'); > > end. > > > > This sample program doesn't return till is pressed.

Re: [fpc-pascal] eof strangeness

2006-05-02 Thread Bob Richards
John Coppens wrote: > program testeof; > > begin > if eof then > writeln('EOF found') > else > writeln('No EOF found'); > end. > > This sample program doesn't return till is pressed. That's correct and reasonable. You are terminating your program after an EOL (ENTER), If you send

[fpc-pascal] eof strangeness

2006-04-23 Thread John Coppens
Hi all. While modifying some older programs, I found a strange effect with eof (input). When calling eof(input), the program needs an key to continue. I just downloaded 2.0.2, with the same result. The definition of eof (according to the FPC docs) is that it immediately returns... which is what

[fpc-pascal] eof strangeness

2006-04-23 Thread John Coppens
Hi all. While modifying some older programs, I found a strange effect with eof (input). When calling eof(input), the program needs an key to continue. The definition of eof (according to the FPC docs) is that it immediately returns... which is what I need. Can anyone suggest a solution for this