Hi all,
I use a lot of local variables in my programming. Instead of writing out "put empty into X" 50 times (1 for each variable), is there any way to put empty into all local variables at the start of a handler?
Thanks so much!!
any way to clear all local variables at start of program
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: any way to clear all local variables at start of program
Greetings all,
I may have answered my own question. I realized that if you put:
local var1,var2,var3, etc.....
at the top of your handler, it will automatically clear them once it exits / re-enters said handler.
However, it would be nice to have a command to flush all local variables at the end of a handler just to be super duper sure they are all flushed out. Any such command?
I may have answered my own question. I realized that if you put:
local var1,var2,var3, etc.....
at the top of your handler, it will automatically clear them once it exits / re-enters said handler.
However, it would be nice to have a command to flush all local variables at the end of a handler just to be super duper sure they are all flushed out. Any such command?
Re: any way to clear all local variables at start of program
Hi.
Local variables are deleted from memory when the handler ends.
But there is a function, "the variableNames", that might be used to do what you want. You can take the list generated from that and clear whatever you want to,
Craig Newman
Local variables are deleted from memory when the handler ends.
But there is a function, "the variableNames", that might be used to do what you want. You can take the list generated from that and clear whatever you want to,
Craig Newman
Re: any way to clear all local variables at start of program
You don't even need to declare the variables in the handler if you don't want to. Variables are never preserved when the handler terminates. There's no need to remove them or worry about their memory usage. They always go poof.
In fact, the usual problem is that people wonder where the values went when the handler ends.
In fact, the usual problem is that people wonder where the values went when the handler ends.

Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com