Re: [fpc-pascal] stdout refuses to be redirected

2008-10-09 Thread Frank Peelo
Arjan van Dijk wrote: You can stop using crt, then you don't need to change your write instuctions. And how about my calls to READKEY and KEYPRESSED? Would unit WINCRT bring a solution? Or should I reconsider the use of these two statements anyhow? One possibility is to assign the output fil

Re: [fpc-pascal] stdout refuses to be redirected

2008-10-09 Thread Tomas Hajny
On Thu, October 9, 2008 11:43, Arjan van Dijk wrote: >> You can stop using crt, then you don't need to change your write >> instuctions. > > And how about my calls to READKEY and KEYPRESSED? > Would unit WINCRT bring a solution? > Or should I reconsider the use of these two statements anyhow? You

Re: [fpc-pascal] stdout refuses to be redirected

2008-10-09 Thread Arjan van Dijk
> You can stop using crt, then you don't need to change your write > instuctions. And how about my calls to READKEY and KEYPRESSED? Would unit WINCRT bring a solution? Or should I reconsider the use of these two statements anyhow? Regards, Arjan ___

Re: [fpc-pascal] stdout refuses to be redirected

2008-10-09 Thread Arjan van Dijk
> You can stop using crt, then you don't need to change your write > instuctions. Phew Thanks! Arjan ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] stdout refuses to be redirected

2008-10-09 Thread Vincent Snijders
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

Re: [fpc-pascal] stdout refuses to be redirected

2008-10-09 Thread Arjan van Dijk
> 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

Re: [fpc-pascal] stdout refuses to be redirected

2008-10-09 Thread Vincent Snijders
Arjan van Dijk schreef: Hi! The following small piece of code, with filename 'test.pas': PROGRAM Test; USES CRT,DOS; VAR DirInfo: SEARCHREC; BEGIN FINDFIRST('*.pas',ARCHIVE,DirInfo); WRITELN(DirInfo.Name); END. just gives the name of the first file with extension ".pas". It compiles and

[fpc-pascal] stdout refuses to be redirected

2008-10-09 Thread Arjan van Dijk
Hi! The following small piece of code, with filename 'test.pas': PROGRAM Test; USES CRT,DOS; VAR DirInfo: SEARCHREC; BEGIN FINDFIRST('*.pas',ARCHIVE,DirInfo); WRITELN(DirInfo.Name); END. just gives the name of the first file with extension ".pas". It compiles and runs fine when I call is a