Before I begin, I must preface, stating that I am a newbie when it comes to Fortran. I keep the inherited piece of code since 1978. Its purpose is to read some data values ββfrom a file, process the values, and then output the processed values ββto another text file.
Given the following FORTRAN code:
INTEGER NM,STUBS,I,J,K
PARAMETER (NM=67,STUBS=43)
INTEGER*4 MDS(STUBS,NM)
CALL OPEN$A(A$RDWR,'/home/test/data.txt', MAXPATHLEN,1)
CALL OPEN$A(A$WRIT,'out',11,2)
DO 90 I=1,2
READ(1,82) STUB
WRITE(2,80) STUB,(MDS(I,J),J=1,24)
90 CONTINUE
80 FORMAT(/1X,A24,25I5)
82 FORMAT(1X,A24,25F5,1)
My question is about instructions WRITE().
I understand that it (2,80)refers to an open file output stream and points to a file 'out'and refers to the number 2. I understand that 80 refers to the format operator referenced by label 80.
STUBused to store the values ββread from the input of file 1. These values ββare what is processed and stored in MDS(I,J)the section !-- data processing --!that I skipped.
, (MDS(I,J),J=1,24) 24 ? , 1 24?