govett@avsd.UUCP (David Govett) (04/12/88)
I'm studying Personal Pascal for the Atari ST, but am having trouble redirecting output to the printer. I know that writeln(output,'text') will output to the screen, but how do I redirect output from standard output to the printer? Please give a specific example, if possible. Thanks for any help.
starbrd@ucscb.UCSC.EDU (61779000) (04/13/88)
In article <100@avsd.UUCP> govett@avsd.UUCP (David Govett) writes: >I know that writeln(output,'text') will output to the screen, but how do I redirect output from standard output to the printer? I used Apple ][ Pascal some years ago, and to send output to the printer one used writeln(printer,'text') . I do not recall if there was way to send output to both the screen and the printer at once. Steven Widom starbrd@ucscb.ucsc.edu
pilgrimk@lafcol.UUCP (Pilgrim Kenwyn A) (04/15/88)
In article <100@avsd.UUCP>, govett@avsd.UUCP (David Govett) writes: > I'm studying Personal Pascal for the Atari ST, but am having trouble > redirecting output to the printer. > I know that > writeln(output,'text') > > will output to the screen, but how do I redirect output from > standard output to the printer? > > Please give a specific example, if possible. > > Thanks for any help. This works in TP3. The only non-standard function is assign. var Dev : text; {file of char} begin . . . assign(Dev, 'lpt1:'); {or try assign(Dev, 'lpt1')}; rewrite(Dev); . . . close(Dev); end. You could set up a case staement to decide to which device the ouput should go to.