c_wilson@oxy.edu (Clarence Regis Wilson) (09/28/89)
You can send your output to the printer using the following commands: uses printer; writeln(lst,'This will be sent to printer'); Remember, though, that the string will be sent only to the printer. If you must see the output on the screen also, you must duplicate the 8 *writeln* statement without the *lst* option.
c_wilson@oxy.edu (Clarence Regis Wilson) (09/28/89)
You may send your output to the printer using the following commands: uses printer; writeln(lst,'This will be output to the printer device'); Remember, though, that the output will \_only_/ be sent to the printer. If you want to see the string on the screen, you must duplicate the *writeln* command without using the *lst* option.
brianr@phred.UUCP (Brian Reese) (09/30/89)
In article <50331@tiger.oxy.edu> c_wilson@oxy.edu (Clarence Regis Wilson) writes: >You can send your output to the printer using the following commands: > >uses printer; > >writeln(lst,'This will be sent to printer'); > >Remember, though, that the string will be sent only to the printer. >If you must see the output on the screen also, you must duplicate >the 8 >*writeln* statement without the *lst* option. OK, OK. I'll give in. The original poster is using Turbo 3.02. 3.0 does not *use* any units. The simplest way I see to do this is to redefine the standard Output to prn as follows: program Test(Output); begin WriteLn('This is CRT output'); Assign(Output, 'prn'); ReWrite(Output); WriteLn('This is PRN output'); end. Good luck. Brian -- Brian Reese uw-beaver!pilchuck!seahcx!phred!brianr Physio Control Corp., Redmond, Wa. brianr@phred.UUCP "Do not write on this line. This line has been left blank intentionally."
brianr@phred.UUCP (Brian Reese) (09/30/89)
In article <2765@phred.UUCP> brianr@phred.UUCP (Brian Reese) writes: > >OK, OK. I'll give in. The original poster is using Turbo 3.02. 3.0 does not >*use* any units. The simplest way I see to do this is to redefine the >standard Output to prn as follows: > >begin > WriteLn('This is CRT output'); > Assign(Output, 'prn'); > ReWrite(Output); > WriteLn('This is PRN output'); >end. I just posted this, then a couple of articles later, someone said this would not work with 3.02. I am using 4.0 (haven't used 3.0 for some time) and was pretty sure it would work with 3.0. If it doesn't, sorry. As Gilda would say: "Never mind." :-) Brian -- Brian Reese uw-beaver!pilchuck!seahcx!phred!brianr Physio Control Corp., Redmond, Wa. brianr@phred.UUCP "Do not write on this line. This line has been left blank intentionally."
brianr@phred.UUCP (Brian Reese) (10/02/89)
Attn: Joe Duval Joe, your mail bounced so here is my reply. In reference to the following code: >program Test(Output); > >begin > WriteLn('This is CRT output'); > Assign(Output, 'prn'); > ReWrite(Output); > WriteLn('This is PRN output'); >end. > you suggested that the second WriteLn should explicity use the standard device Output, i.e. WriteLn(Output, 'This is PRN output'); Well, it's my understanding that when Write or WriteLn is called with no device specification, it defaults to Output, whatever Output is defined to be. In this case, it is redefined as 'prn'. I admit, this does not solve the original posters problem because this doesn't work with Turbo 3.0, (can't reassign a standard device, which I figured out last weekend), but I did run it on 4.0 and got the correct result. Thanx for responding. Brian -- Brian Reese uw-beaver!pilchuck!seahcx!phred!brianr Physio Control Corp., Redmond, Wa. brianr@phred.UUCP "Do not write on this line. This line has been left blank intentionally."