Topic: How to print to my Brother printer in Fortran 77

How to define unit 6 as my printer?

Re: How to print to my Brother printer in Fortran 77

I found out that a WRITE statement with unitnumber 6 effectively does write to the printer.
After the job is finished you have to go to the file tab and choose the print option.In The new pane you choose your printer and print the job. (verything that has been send to the printer.
s there an other way?

Re: How to print to my Brother printer in Fortran 77

There isn't a "portable" way to print from a conventional Fortran program to a printer directly.  Such actions did make sense to some degree when line printers were still normal, but modern printers effectively require an image of the page to be sent to the printer. 

Fortran is a general-purpose language, so one could conceivably use the Windows API to write routines which would send something directly to the printer, but it wouldn't be as simple as assigning a unit number it would be hundreds to thousands of lines of code.  Similar work would be necessary on macOS and Linux.

The simplest way to achieve what you want is to write to a file (preferably using a unit number other than 6), open the file directly in Simply Fortran or another text editor, and printing that file from there.

Jeff Armstrong
Approximatrix, LLC

Re: How to print to my Brother printer in Fortran 77

Thanks Jeff.
This makes it clear to me.
Yes i am still stuck in the time (1972 -IBM IV Fortran v 4.3) and the we used linprinters maxtrix printer style with tractored paper.
I'll use a file and print it later.

Kindly .
McTes