[Lazarus] Valladolid Programming Contest simple test fails at compile?

Mehmet Erol Sanliturk sanliturk at ttmail.com
Sat Mar 28 01:33:17 CET 2009


On Friday 27 March 2009 08:08:20 pm JoshyFun wrote:
> Hello Thierry,
> TC>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


Additionally :

Between   _readln _ and _until eof_ statements , there should be an 
if statement
such as 

if not eof
then
begin
      { statements between readln and until eof ... }
end ;


because when EOF is seen those  stements should not be executed 
because there is no valid input at that state .

Thank you very much .

Mehmet Erol Sanliturk




More information about the Lazarus mailing list