;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ ;+ ; ; @file_comments ; erase a variable ; same thing that delvar but usable in a program and usable ; for one variable simultaneously ; ; @categories utilities ; ; @param varname {in}{required} The name of the variable we want erase ; ; @example IDL> a=1 ; IDL> undefine,a ; % Compiled module: UNDEFINE. ; IDL> help, a ; A UNDEFINED = ; ; @history trouve sur la page web de D.Fanning ; http://www.dfanning.com : ;QUESTION: How do I make an IDL variable have a type "undefined"? ;ANSWER: At the main IDL level you can use the IDL procedure DELVAR to ;delete an IDL variable and make it undefined. Inside of procedures ;and functions, I use this little program named UNDEFINE that I got ;from Andrew Cool at the DSTO High Frequency Radar Division in ;Adelaide, Australia. ; ;- ;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ PRO UNDEFINE, varname ; compile_opt idl2, strictarrsubs ; tempvar = SIZE(TEMPORARY(varname)) END