Delete Variable command

Mark Smith mark at maseurope.net
Sun Mar 26 15:00:20 EST 2006


Bob, as you've found, delete variable will only work on a variable
that has been declared (local or global) or created  by assigning a
value to it inside a handler. In the latter case, it will be deleted
anyway when the handler exits.

If you simply want to free up memory, you can "put empty into myVar",
which will replace whatever was in the variable with, well, empty. The
variable will still exist of course, and if it didn't before, it will
now, but it'll be taking up very little memory.

Best,

Mark

On 26 Mar 2006, at 05:28, Robert Sneidar wrote:

It seems odd to me that the Delete Variable command would return a
compiler error if it didn't detect that the variable you were trying
to delete existed. I may not know or care if it does, I just want to
delete it if it does. Otherwise I have to go through a series of
commands to see if it does before I try to delete it, and even then I
will get a compile error. It doesn't help putting it inside a try
construct, because it's a compile time error. Seems it should be
treated as runtime, if treated as an error at all!



More information about the use-livecode mailing list