Question about printing with FORTRAN

  • Context: Fortran 
  • Thread starter Thread starter DoktorD
  • Start date Start date
  • Tags Tags
    Fortran Printing
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
DoktorD
Messages
6
Reaction score
0
Hey guys,

I tried looking around on the web and came back without much luck..

Is it possible to print FORTRAN output using FORTRAN code? When I say "print," I mean to a local printer such as a laserjet.. not just printing to the terminal screen..

I've searched pretty intensely on the internet, but haven't found much at all.. I was hoping you guys could at least point me in the right direction.

Thanks!
 
Physics news on Phys.org
Once upon a time, when I learned Fortran more than 35 years ago, a certain I/O unit number was always associated with the "line printer," I think it was 3, so you could write something like WRITE (3, 20) FOO, BAR to write to the printer. But that was in the days of hard-wired printers and before software-based printer interfaces (drivers).

Your compiler might have an option available in the OPEN statement that allows you to associate a unit number with a locally-connected printer, or more properly, with its printer driver. You'll have to look in your compiler's manual. It's probably compiler- and OS- specific.