Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!news.funet.fi!uwasa.fi!ts From: ts@uwasa.fi (Timo Salmi) Newsgroups: comp.lang.pascal Subject: Re: Redirection in Pascal Message-ID: <1990Nov9.174737.16317@uwasa.fi> Date: 9 Nov 90 17:47:37 GMT References: <1990Nov8.001233.16525@athena.mit.edu> Organization: University of Vaasa Lines: 30 In article <1990Nov8.001233.16525@athena.mit.edu> fmbasas@athena.mit.edu (Fred M Basas) writes: >Hi! I'm relatively new to this group, so forgive me if this topic has >been touched upon before. > >Is there a way in TP 5.5 to redirect all printer output to a file on disk. >I mean this for any program, not one that I'm writing. I'm looking for a >simple solution (i.e. no TSRs if at all possible) for this if there is one. To redirect (not only the printer, but any output) one simply uses assign within a Turbo Pascal program. That is what it is for. (Consider the meaning of the word assign. It figures, right). Example: uses printer; begin assign (lst, 'testfile'); rewrite (lst); writeln (lst, 'Hello world'); close (lst); end. But if you want to redirect printing to a file (as you obviously do) of any program, your question has nothing to do with Turbo Pascal in particular. Then you need a TSR. Such programs (e.g. /pc/pd2/lptx.zip) can be found on uwasa.fi archives by anonymous ftp or mail server. ................................................................... Prof. Timo Salmi (Moderating at anon. ftp site 128.214.12.3) School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun