On Sat, 20 Dec 2008, Mark Morgan Lloyd wrote:
> I can get a program compiled with Turbo Pascal to use the existing stderr > handle for output like this: > > PROGRAM Meta2(Input, Output, Error); > .. > Assign(Error, ''); > Rewrite(Error); > TextRec(Error).Handle:= 2; > > or in the case of Delphi: > > program Meta2; > .. > Assign(Error, ''); > Rewrite(Error); > TTextRec(Error).Handle:= GetStdHandle(STD_ERROR_HANDLE); > > Is there a correct and portable way to do this using FPC? I would think that TTextRec(Error).Handle:=TTextRec(StdOut).Handle Does the trick ? Michael. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal