- #1
fortranuser
- 7
- 0
Hi all,
I have attached my text file(tab delimited).
I am planning to read those dataset into real array of (30,38). The dataset has variable decimal places like 312.66, 0, 535.696 ,456122.758.
With the following codes,
READ(12,*)((X(I,J),I=1,30),J=1,38)
WRITE(*,20)((X(I,J),i=1,30),j=1,38)
20 format(58(f12.3x,2x))
I was able to read the original txt file and stored those data into real array of (30,38) and then it was written in new txt file.
The problem is that because of the format(58(f12.3x,2x)) the data set in latter file got changed(now each data set has 3 decimal places)
Is it possible to make data in latter file similar to original text file
I have attached my text file(tab delimited).
I am planning to read those dataset into real array of (30,38). The dataset has variable decimal places like 312.66, 0, 535.696 ,456122.758.
With the following codes,
READ(12,*)((X(I,J),I=1,30),J=1,38)
WRITE(*,20)((X(I,J),i=1,30),j=1,38)
20 format(58(f12.3x,2x))
I was able to read the original txt file and stored those data into real array of (30,38) and then it was written in new txt file.
The problem is that because of the format(58(f12.3x,2x)) the data set in latter file got changed(now each data set has 3 decimal places)
Is it possible to make data in latter file similar to original text file