X
4313 Rate this article:
No rating

A small, helpful routine

Anonym
A small item this week because it's Thanksgiving. In DG, you can close all open windows with a statement like this:
IDL> while !d.window ne -1 do wdelete, !d.window
Here's my two-line equivalent in NG, wrapped into a procedure:
pro windowdeleteall
   compile_opt idl2
   
   w = getwindows()
   if n_elements(w) gt 0 then foreach i, w do i.close
end
Call this routine with:
IDL> windowdeleteall
to close all open NG windows.