Last change
on this file since 134 was
134,
checked in by navarro, 18 years ago
|
change *.pro file properties (del eof-style, del executable, set keywords Id
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
1.3 KB
|
Rev | Line | |
---|
[2] | 1 | ;------------------------------------------------------------ |
---|
| 2 | ;------------------------------------------------------------ |
---|
| 3 | ;------------------------------------------------------------ |
---|
| 4 | ;+ |
---|
| 5 | ; |
---|
[133] | 6 | ; @file_comments |
---|
| 7 | ; erase a variable |
---|
| 8 | ; same thing that delvar but usable in a program and usable |
---|
| 9 | ; for one variable simultaneously |
---|
[2] | 10 | ; |
---|
[133] | 11 | ; @categories utilities |
---|
[2] | 12 | ; |
---|
[133] | 13 | ; @param varname {in}{required} The name of the variable we want erase |
---|
[2] | 14 | ; |
---|
[133] | 15 | ; @example IDL> a=1 |
---|
| 16 | ; IDL> undefine,a |
---|
| 17 | ; % Compiled module: UNDEFINE. |
---|
| 18 | ; IDL> help, a |
---|
| 19 | ; A UNDEFINED = <Undefined> |
---|
[2] | 20 | ; |
---|
[133] | 21 | ; @history trouve sur la page web de D.Fanning |
---|
[2] | 22 | ; http://www.dfanning.com : |
---|
| 23 | ;QUESTION: How do I make an IDL variable have a type "undefined"? |
---|
| 24 | ;ANSWER: At the main IDL level you can use the IDL procedure DELVAR to |
---|
| 25 | ;delete an IDL variable and make it undefined. Inside of procedures |
---|
| 26 | ;and functions, I use this little program named UNDEFINE that I got |
---|
| 27 | ;from Andrew Cool at the DSTO High Frequency Radar Division in |
---|
| 28 | ;Adelaide, Australia. |
---|
| 29 | ; |
---|
| 30 | ;- |
---|
| 31 | ;------------------------------------------------------------ |
---|
| 32 | ;------------------------------------------------------------ |
---|
| 33 | ;------------------------------------------------------------ |
---|
| 34 | PRO UNDEFINE, varname |
---|
[114] | 35 | ; |
---|
| 36 | compile_opt idl2, strictarrsubs |
---|
| 37 | ; |
---|
[2] | 38 | tempvar = SIZE(TEMPORARY(varname)) |
---|
| 39 | END |
---|
| 40 | |
---|
Note: See
TracBrowser
for help on using the repository browser.