Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!batcomputer!rpi!pawl14.pawl.rpi.edu!fargo From: fargo@pawl.rpi.edu (Ethan M. Young) Newsgroups: comp.lang.pascal Subject: Re: Logging stdin and stdout to file in Turbo Pascal Message-ID: <681@rpi.edu> Date: 20 Feb 89 17:25:38 GMT References: <1675@csuna.UUCP> Sender: usenet@rpi.edu Organization: Rensselaer Polytechnic Institute, Troy, NY Lines: 25 You might try making a procedure which calls the write procedure and logs the output to a file. Eg: PROCEDURE OutLog(VAR anything; code : integer); VAR logfile : TEXT; { Log file } BEGIN { OutLog } write(anything); Assign(logfile,'filename.ext'); Rewrite(logfile); { or Append(logfile) } CASE code OF 0: writeln(logfile,'Output: ',anything,' performed on',date,' at ',time); ... ELSE: writeln(logfile,'Error: Output is unusually idiotic'); END; { CASE } END; { OutLog } This little piece of code should do the trick. Thank you and happy hunting! Internet: fargo@pawl.rpi.edu ____ [> SB <] fargo@{paraguay|uruguay}.acm.rpi.edu /__ -=>??<=- Bitnet (??): usergac0@rpitsmts.bitnet / ARGO : 3000 years of regression from the year 4990