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

  • Context: Fortran 
  • Thread starter Thread starter masyousaf1
  • Start date Start date
  • Tags Tags
    Fortran
Click For Summary

Discussion Overview

The discussion centers around the meaning and usage of the characters "(5,*)", "(6,*)", and "(*,*)" in Fortran programming, particularly in relation to READ and WRITE statements. Participants explore historical context, syntax, and the implications of these codes in input and output operations.

Discussion Character

  • Technical explanation
  • Exploratory

Main Points Raised

  • One participant inquires about the necessity of "(5,*)" after READ and "(6,*)" after WRITE, questioning their specific uses.
  • Another participant explains that filecode 5 was historically used for standard card input and filecode 6 for output to printers, later evolving to represent terminal device interactions.
  • It is noted that the asterisk (*) signifies reading from or writing to the terminal device, with the second asterisk indicating a free form format for the data being read or written.
  • A participant corrects a previous statement regarding the second asterisk, clarifying it pertains to the data rather than the day.
  • One participant expresses gratitude for the clarification regarding "(*,*)" and mentions that the thread is closed after finding the explanation satisfactory.
  • Another participant shares a link to a Google search result that provides a summary of the Fortran read statement.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the broader implications of these codes, but there is a general agreement on their historical context and usage in terminal interactions. Some points remain clarified while others are still open to interpretation.

Contextual Notes

Some statements rely on historical context that may not be universally applicable to all versions of Fortran. There are also potential ambiguities in the interpretation of the asterisk symbols and their specific applications in different contexts.

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
 
Technology 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
 

Similar threads

  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 17 ·
Replies
17
Views
6K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 4 ·
Replies
4
Views
8K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
8K