delete variable name from memory [message #44266] |
Thu, 02 June 2005 05:10  |
saplizki
Messages: 4 Registered: June 2005
|
Junior Member |
|
|
I need to delete my variable from the variable name list.
but i don't locate at the top level (i'm in a gui program) so i can't
'delvar' it.
also i can't (don't want to) zero it because it won't remove from the
variable list (when i press help or use ROUTINE_NAMES or ROUTINE_INFO)
and i use that list at my program.
|
|
|
Re: delete variable name from memory [message #44304 is a reply to message #44266] |
Tue, 07 June 2005 10:23  |
saplizki
Messages: 4 Registered: June 2005
|
Junior Member |
|
|
This is a good idea on paper but it is't help me because sometimes the
variable name repeat himself so if i erase him from the list i will
never find him.
p.s.
The original problem was that i do restore and i don't know what is the
restored variable name.
|
|
|
Re: delete variable name from memory [message #44316 is a reply to message #44266] |
Mon, 06 June 2005 13:53  |
Michael Wallace
Messages: 409 Registered: December 2003
|
Senior Member |
|
|
saplizki@gmail.com wrote:
> but i do need to removes any notion of ever having seen such a
> variable.
> And David's solutions and Antonio's solutions dosn't do it, so how can
> i really remove it.
Do you really want to delete the variable or do you just not want to
show that it is there in the output from routine_info()? If the latter,
you can call routine_info() like normal, but then filter out the
variable names that should not show up in the output. The user is shown
the rest of the list and has no clue that the other variables exist.
The one problem with this is that you'd have to maintain a list of the
variable names that should not be shown. If you were to change the name
of a "hidden" variable in your program, you'd also have to edit this
list as well. Otherwise the variable would start showing up in your output.
-Mike
|
|
|
|
Re: delete variable name from memory [message #44332 is a reply to message #44266] |
Mon, 06 June 2005 03:39  |
rm
Messages: 4 Registered: June 2005
|
Junior Member |
|
|
saplizki@gmail.com wrote:
> but i do need to removes any notion of ever having seen such a
> variable.
> And David's solutions and Antonio's solutions dosn't do it, so how can
> i really remove it.
I suspect what you want can't be done. If you take the simple code
below, 'A' appears in the variable list even though the line has never
and can never be executed.
pro test
goto, avoidvariable
a=10
avoidvariable:
end
IDL> .run test
% Compiled module: TEST.
IDL> print, routine_info('test', /var)
A
IDL>
|
|
|