[fpc-pascal] stdout refuses to be redirected

Vincent Snijders vsnijders at vodafonevast.nl
Thu Oct 9 10:59:44 CEST 2008


Arjan van Dijk schreef:
>> 1. Don't use the crt unit, it grabs the handling of output (writeln(s)
>> is translated to writeln(output,s);
>>
>> 2. Use writeln(stdout, DirInfo.Name) to bypass crt's handling of output.
> 
> This indeed seems to solve both problems.
> Does this really mean that I should replace all WRITELN( statements
> throughout my code
> into WRITELN(STDOUT), ? And probably also all WRITE( statements into
> WRITE(STDOUT, ?
> I always thought that WRITELN; was such a nice, basic instruction.
> 

You can stop using crt, then you don't need to change your write 
instuctions.

Vincent



More information about the fpc-pascal mailing list