; ;------------------------------------------------------------------- ; function cgmclose,flnm set_plot,'cgm' on_ioerror,bad device,/close_file print,' ' print,'Closed cgm device file ',flnm set_plot,'X' return,0 ; bad: print,' ' print,'>>> Error closing cgm device file ' print,' IDL error msg: ',!err_string set_plot,'X' return,-1 end