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

Thierry Coq tcoq at free.fr
Fri Mar 27 18:23:42 CET 2009


yes, it does read from standard input and output file. So there's no 
need to create textfiles. (It is possible to mention the input and 
output files in the program declaration such as : program test1(input, 
output).

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

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

Thanks all of you for the help!
Thierry

Vincent Snijders wrote:
> waldo kitty schreef:
>   
>> Mehmet Erol Sanliturk wrote:
>>     
>>> On Thursday 26 March 2009 05:16:32 pm Thierry Coq wrote:
>>>       
>>>>  >> TEST PROGRAM
>>>>
>>>> program Test1;
>>>>         
>> [CHOMP]
>>     
>>>>   until eof;
>>>> end.
>>>>
>>>> << END OF TEST PROGRAM
>>>> _______________________________________________
>>>>
>>>>         
>>> At until eof , there should be a file variable name as eof ( FN ) 
>>> where FN may be
>>>
>>> var FN : Text ;
>>> or
>>> var FN : File ... ;
>>>       
>> not only that, there's nothing that names and opens that file, either...
>>
>>     
>
> So, it must read from stdin, which seems a reasonable thing in contests.
>
> Vincent
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
>   




More information about the Lazarus mailing list