Hello!
Here's my problem:
I don't know in which way I have to change these lines, to get a program which doesn't skip into the next line after the first value that has been readed.
Any line should be read till its end and contemporary the values should be counted.
Here are the lines:
DO
READ (10, *, IOSTAT = fehler) zahl
IF (fehler == 0) THEN
summe = summe + zahl
n = n + 1
ENDIF
IF (fehler /= 0) EXIT
ENDDO
I want to read a file which looks for example like this:
3.5 7.9 30.5 21.3
2.9 3.7 2.8
3.7 4.1 3.2 19.8 210.7
(blanks between the values and no fixed format/size)
Thank you very much for any support!
Here's my problem:
I don't know in which way I have to change these lines, to get a program which doesn't skip into the next line after the first value that has been readed.
Any line should be read till its end and contemporary the values should be counted.
Here are the lines:
DO
READ (10, *, IOSTAT = fehler) zahl
IF (fehler == 0) THEN
summe = summe + zahl
n = n + 1
ENDIF
IF (fehler /= 0) EXIT
ENDDO
I want to read a file which looks for example like this:
3.5 7.9 30.5 21.3
2.9 3.7 2.8
3.7 4.1 3.2 19.8 210.7
(blanks between the values and no fixed format/size)
Thank you very much for any support!