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

What is meaning of (5,*), (6,*)and (*,*) in Fortran ?

  1. Feb 23, 2015 #1
    Dear Members,

    Why The characters "(5,*)" should appear after every READ and the characters "(6,*)" after every WRITE ? What is the use of "(*,*)" that can appear with either the READ or WRITE statements.

    Best Regards
     
  2. jcsd
  3. Feb 23, 2015 #2

    jedishrfu

    Staff: Mentor

    Filecode 5 was historically the standard card input for fortran and filecode 6 was for output to the printer.

    Later 5 became read from the terminal device and 6 to write to the terminal device which then became using * as meaning read from or write to the terminal device. The second * is for a free form format for the day being read or written.
     
  4. Feb 23, 2015 #3

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    I think you mean 'the data being read or written.'
     
  5. Feb 23, 2015 #4
    Thank you jedishfu for your prompt response. I just found the explanation for (*,*). If one wishes to use the write statement to write a statement to the default output, the syntax is write(*,*). SO the thread is closed now
     
    Last edited: Feb 23, 2015
  6. Feb 23, 2015 #5

    jedishrfu

    Staff: Mentor

    Yeah thanks SteamKing I am sometimes a victim of the overzealous spell checker on my iPad and I often forget to check back because I know what I typed.
     
  7. Feb 24, 2015 #6

    jtbell

    User Avatar

    Staff: Mentor

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: What is meaning of (5,*), (6,*)and (*,*) in Fortran ?
Loading...