このようなデータセットを読み込もうとしています
DATE,TIME,val
1/1/2001,1:00:00,0
プログラムで
program main
implicit none
real :: val
character(len=8) :: date
character(len=7) :: time
open(1,file='data.csv',status='old')
read(1,*) ! header
read(1,fmt=100)date,time,val
100 FORMAT (A,1x,A,1x,F3.1)
end program
日付と時刻が常に 8 文字または 7 文字である場合、これはすべて問題ありませんが、たとえば、そうではありません。
4/21/2001,19:00:00,0
例の日付、時刻、および val 行の両方を読み取るには、fortran の形式をどのように宣言すればよいですか?
ありがとうございました