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

Thierry Coq tcoq at free.fr
Sat Mar 28 08:04:22 CET 2009


Thank you guys,

The code works perfectly with the keyboard (it won't stop which is 
normal) or when I feed it an input file (it stops fine after a few 
milliseconds of work). Eof or Eoln doesn't seem to be the issue. I've 
tried another problem where the input finishes by the "quit" word, and I 
have the same issue.
FYI, I've attached the two tests for problem 100 (test3) and problem 101 
(test4).

Has somebody here delivered a successful pascal program to the UVa 
online judge: http://icpcres.ecs.baylor.edu/onlinejudge/index.php ?

Test problem 100: 
http://icpcres.ecs.baylor.edu/onlinejudge/index.php?option=com_onlinejudge&Itemid=8&category=3&page=show_problem&problem=36

Test problem 101:
http://icpcres.ecs.baylor.edu/onlinejudge/index.php?option=com_onlinejudge&Itemid=8&category=3&page=show_problem&problem=37

Best regards,
Thierry,

Mehmet Erol Sanliturk wrote:
> 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
>
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
>   

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test3.lpr
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20090328/66ce6d4b/attachment-0014.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test4.lpr
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20090328/66ce6d4b/attachment-0015.ksh>


More information about the Lazarus mailing list