pro rd ; ; If the string "eui" is found in ascii input file, ; read vars eui, pwi from this line. ; Likewise, if the string "gpe" is found, read vars ; gpe, rke, rkgp ; file = 'pr_2_3.6_2' lu = 1 openr,lu,file print,'Opened file ',file line = '' eui = double(0.) & pwi = double(0.) gpe = double(0.) & rke = double(0.) & rkgp = double(0.) while not EOF(lu) do begin readf,lu,line ; ; Example line: ; eui = 8.9820993D+48 pwi = 5.9330605D+48 ; if (strpos(line,'eui') ge 0) then begin print,line reads,line,format="(7x,e16.7,11x,e16.7)",eui,pwi endif ; ; Example line: ; gpe = 1.8343362D+49 rke = 2.7119388D+47 rkgp = 1.4784306D-02 ; if (strpos(line,'gpe') ge 0) then begin print,line reads,line,format="(7x,e16.7,11x,e16.7,11x,e16.7)",gpe,rke,rkgp endif endwhile print,'' print,'eui=',eui,' pwi=',pwi print,'gpe=',gpe,' rke=',rke,' rkgp=',rkgp free_lun,lu end