Array won't go away!

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

Array won't go away!

Post by bjb007 » Thu May 22, 2008 3:10 pm

I have an array into which I put values
programmatically.

In an earlier test values were put into
the array elements and now I can't find
a way to empty the array.

Even after I "Close and remove from memory"
or close Rev and restart the same values are
still there.

I've noticed this with other variables which
appear in the Variable Watcher window even
when I haven't run the script in which they're used.

How do I get rid of these values?
Life is just a bowl of cherries.

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Fri May 23, 2008 12:52 pm

If you just want to empty the entire array in one go, use:

Code: Select all

put empty into theArrayVariabe
And if you want to delete the entire array from memory, use:

Code: Select all

delete theArrayVariable
You can also remove individual array entires using:

Code: Select all

delete variable theArrayVariable["thekey"]
Hope this helped,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Post Reply