Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Question about printing with FORTRAN

  1. Jun 10, 2010 #1
    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!
     
  2. jcsd
  3. Jun 11, 2010 #2

    jtbell

    User Avatar

    Staff: Mentor

    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Question about printing with FORTRAN
Loading...