PRO xmoon,file OPENR,in,file,/GET_LUN OPENW,out,file+'.xmoon',/GET_LUN title='' READF,in,title PRINTF,out,title+' MoonGlow(7000A)' mest='' REPEAT BEGIN READF,in,h,m,s,sad,sam,sed,sem,mad,mam,mest,mp $ ,FORMAT='(I2,1X,I2,1X,I2,2X,I3,1X,I2,2X,I3,1X,I2,2X,I3,1X,I2,2X,A6,2X,I3)' sign=1 IF STRPOS(mest,"-") NE -1 THEN sign=-1 med=ABS(FIX(STRMID(mest,0,3))) mem=FIX(STRMID(mest,4,2)) me=sign*(med+mem/60.) ; get the sign right IF me LT 0 THEN mg7000=0. ELSE mg7000=moonglow(me,mp,7000) PRINTF,out,h,m,s,sad,sam,sed,sem,mad,mam,mest,mp,mg7000 $ ,FORMAT='(I2,":",I2.2,":",I2.2,2X,I3,":",I2.2,2X,I3,":"'+ $ ',I2.2,2X,I3,":",I2.2,2X,A6,2X,I3,2X,F5.3)' ENDREP UNTIL EOF(in) CLOSE,in & FREE_LUN,in SPAWN,'rm '+file CLOSE,out & FREE_LUN,out RETURN END