Importing data from file to array
Posted
by stamp
on Stack Overflow
See other posts from Stack Overflow
or by stamp
Published on 2010-04-24T11:15:58Z
Indexed on
2010/04/24
11:23 UTC
Read the original article
Hit count: 217
I have 2 dimensional table in file, which look like this:
11, 12, 13, 14, 15
21, 22, 23, 24, 25
I want it to be imported in 2 dimensional array. I wrote this code:
INTEGER :: SMALL(10)
DO I = 1, 3
READ(UNIT=10, FMT='(5I4)') SMALL
WRITE(UNIT=*, FMT='(6X,5I4)') SMALL
ENDDO
But it imports everything in one dimensional array.
© Stack Overflow or respective owner