Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!rphroy!caen!uwm.edu!ux1.cso.uiuc.edu!news.iastate.edu!sharkey!tygra!dave From: dave@tygra.Michigan.COM (David Conrad) Newsgroups: comp.lang.pascal Subject: Re: Stderr from Turbo Pascal Summary: Duh! Message-ID: <1991May27.042447.5630@tygra.Michigan.COM> Date: 27 May 91 04:24:47 GMT References: <15667@ms.maus.de> Organization: CAT-TALK Conferencing System, Detroit, MI Lines: 36 In article <15667@ms.maus.de> Kai_Henningsen@ms.maus.de (Kai Henningsen) writes: > >dave @ michigan.com schrieb am 11.05.1991, 06:38 > >da> In response to the recent question in comp.lang.pascal as to how to >da>write to stderr (standard error) from Turbo Pascal, here is a solution. >da>This unit is a text file device driver. You can assign your own text > >Sorry, but I can't resist. Try the following: > >program Demo; >uses > Dos; >var > StdErr: Text; >begin > Assign(StdErr, ''); > Rewrite(StdErr); > TextRec(StdErr).Handle:=2; > > Writeln('Standard output'); > Writeln(StdErr, 'Standard error'); > > Close(StdErr); >end. >-- >Kai Henningsen Internet: kh@ms.maus.de What can I say, other than "Duh!" :-) Dave Conrad dave@michigan.com -- = CAT-TALK Conferencing Network, Computer Conferencing and File Archive = - 1-313-343-0800, 300/1200/2400/9600 baud, 8/N/1. New users use 'new' - = as a login id. AVAILABLE VIA PC-PURSUIT!!! (City code "MIDET") = E-MAIL Address: dave@Michigan.COM