10 integer iunit, line, commentlines
15 character(len=*) :: fname
25 inquire(file=fname,exist=foundfile)
26 if (.not. foundfile)
then 32 if (.not. foundfile)
then 33 print
"(2a)",
'*** in opendatafile, file not found:', fname
39 open(unit=iunit,file=fname,status=
'old',form=
'formatted')
40 print
"(2a)",
'Reading data file: ', fname
53 do commentlines=-1,1000
54 if (firstchar .eq.
'#')
then 55 read(iunit,
"(a1)") firstchar
61 write(6,602) commentlines
62 602
format(
' first',i2,
63 &
' lines are comments and will be skipped')
subroutine opendatafile(iunit, fname)