Date : Wed, 23 Jan 1985 12:06:14 GMT
From : Dave Beyerl <db21%ihuxk.uucp@BRL-TGR.ARPA>
Subject: Re: Turbo Pascal output
> Subject: Turbo Pascal output
>
> Is there a method that enables program output to be sent
> to the screen and printer??? Cntrl-P works when running
> CPM, but from Turbo Pascal, it doesn't. (at least not on
> my machine.) Do I make the program a .COM file and use Cntrl-P??
> Thanks in advance for any help given.
> Mark Falleroni
> TRW
> Ogden,Ut.
> (mdf)
>
In order to print output to both the screen and the line
printer in Turbo Pascal under CP/M you must include a second
writeln statement which directs its output to the Lst device.
For example, to print the string 'Hello There!' on both the
screen and printer, you would include the following lines in
your program:
writeln ('Hello There!'); { print on screen }
writeln (Lst,'Hello There!'); { print on printer }
This is discussed beginning in section 14.5, Text Files,
of my Turbo manual. There is a program with examples in
section 14.5.1, and a description of the logical devices given
in section 14.5.2.
Dave Beyerl
ihuxk!db21
AT&T Bell Labs, Naperville, IL