PDA

View Full Version : How do I print from my Fortran program?


R. T. (Fortran Man)
08-24-2004, 06:06 PM
I'm porting a mainframe program to Windows. It uses OPEN and PRINT statements to output to a line printer. How do I print from my Fortran program in the Windows environment?

Lahey Support
08-24-2004, 06:14 PM
For Windows, control printing with calls to the Windows API. Lahey does not support opening a printer with an OPEN or sending output directly to a printer with the PRINT statement. To control printing use the Windows API. Example code is available in the PRINTWIN.ZIP example available at the Lahey Code Repository, http://www.lahey.com/code.htm

Some customers have been able to use the mainframe method of print control within the Fortran syntax via OPEN and PRINT statements. Example source is included in the attached file. This method is not supported by Lahey.

Lahey Support
09-24-2004, 06:12 PM
An project that builds the printwin example from Visual Stuido is attached.