woods@hao.UUCP (Greg Woods) (01/17/84)
What I would recommend doing is, of course, a kludge. Read your data lines into a CHARACTER variable, and then do internal file reads (which can be repeated on the same line from different starting points as often as desired) on the resulting line in core. Quick example: program analyz character*82 line open(unit=1,file='datafile') rewind 1 10 continue read(1,100) line 100 format(a) if (line(1:5).eq.'type1') then c code to process type 1 c may include something like c read(line(6:82),200) int1,float1,int2 c200 format(i5,f8.2,i5) else if (line(1:5).eq.'type2') then code to process type 2 ...... endif goto 10 end What this does is only access the file once per line, as FORTRAN requires, and then manipulate that line in-core. Something like this should solve your problem. GREG -- {ucbvax!hplabs | allegra!nbires | decvax!kpno | harpo!seismo | ihnp4!kpno} !hao!woods