- #1
fortranuser
- 7
- 0
hi.
I have a csv file name Relative which has 24 different data set containing characters as well as numbers. It looks like
Date,Hour,Min (RH),Max (RH),Avg (RH)
2012-08-28,0,85.190,87.200,86.325
2012-08-28,1,85.390,88.570,86.775
With reference to one of the thread reply in this forum ,I wrote a fortran code to read the file which is as follows
PROGRAM CSVREAD
CHARACTER(LEN=11)::DATE
INTEGER:R
REAL::MAX,MIN,AVG
OPEN(FILE="RELATIVE",UNIT=15,STATUS="UNKNOWN")
DO WHILE(.TRUE.)
READ(15,*,END=123)DATE,HR,MIN,MAX,AVG
WRITE(*,*)DATE,HR,MIN,MAX,AVG
END DO
123 CONTINUE
CLOSE(15)
END PROGRAM CSVREAD
This program was successfully compiled but while executing its exe file no output in the terminal.
I have a csv file name Relative which has 24 different data set containing characters as well as numbers. It looks like
Date,Hour,Min (RH),Max (RH),Avg (RH)
2012-08-28,0,85.190,87.200,86.325
2012-08-28,1,85.390,88.570,86.775
With reference to one of the thread reply in this forum ,I wrote a fortran code to read the file which is as follows
PROGRAM CSVREAD
CHARACTER(LEN=11)::DATE
INTEGER:R
REAL::MAX,MIN,AVG
OPEN(FILE="RELATIVE",UNIT=15,STATUS="UNKNOWN")
DO WHILE(.TRUE.)
READ(15,*,END=123)DATE,HR,MIN,MAX,AVG
WRITE(*,*)DATE,HR,MIN,MAX,AVG
END DO
123 CONTINUE
CLOSE(15)
END PROGRAM CSVREAD
This program was successfully compiled but while executing its exe file no output in the terminal.