Hello Thierry,

Friday, March 27, 2009, 6:23:42 PM, you wrote:

TC> Adding {$MODE OBJFPC}on Joshyfun's suggestion solved the compiler error.

TC> Now I have an time exceeded issue, which doesn't seem too likely as I
TC> implemented a rather standard solution. I wonder if the "repeat until
TC> eof" or "while eof do" is not the issue...the program would be waiting
TC> endlessly for another input which isn't coming. Usually one checks the
TC> input file is empty by using eof. Is there another way recommended for
TC> these contests?

I have none experience on the contest scene, but eof in the stdin
looks nonsense for me when you input data using the keyboard, 'cos
after the first line (readln) the eof is a fact ;)

"eof or empty line" seems to be more logical to me. You should check
how the program works if you feed stdin from a file:

test.exe < file.txt

-- 
Best regards,
 JoshyFun

_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to