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

  • Topic: Fortran 
  • Thread starter Thread starter masyousaf1
  • Start date Start date
  • Tags Tags
    Fortran
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
5 replies · 5K views
masyousaf1
Messages
26
Reaction score
0
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
 
Physics news on Phys.org
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.
 
  • Like
Likes   Reactions: masyousaf1
jedishrfu said:
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.

I think you mean 'the data being read or written.'
 
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:
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.
 
A Google search for "fortran read statement" gave me this nice summary as the very first hit:

http://www.oc.nps.edu/~bird/oc3030_online/fortran/io/io.html