;;file: torus1:[gll_raw.eng]trim_table.pro ;; ;;written by Greg Rutz 6-5-96 ;; ;;updated 6-6-96 by GDR ;; --added feature to extract subcommutated E-1680 values pro trim_table,filename openr,infil,filename,/get_lun ofile = '' read,'Enter name of output file --> ',ofile openw,outfil,ofile,/get_lun a = '' on_ioerror,done while(1) do begin readf,infil,a if a eq '' then a = '' $ else if strpos(a,'ERT gap ->') ge 0 then a = '' $ else if strpos(a,'PAGE') ge 0 then a = '' $ else begin if strmid(a,3,1) eq ':' then begin value=long(strmid(a,0,3)) value = value MOD 4 case value of 0 : strput,a,'3429',28 1 : strput,a,'3430',28 2 : strput,a,'3431',28 3 : strput,a,'3432',28 endcase endif printf,outfil,a endelse endwhile done: on_ioerror,null free_lun,outfil,infil end