I've created an array, used it once ,now I don't need it anymore.Is there a way to get rid of it,or do I have to use something like this:
Create dim ship(19)
use it
now cancel
dim ship( )?
later,
mudcat
Since you want to get rid of an array I assume you want to use this locally in a function? Try banks instead, they can be created and free'ed locally.
If not, why bother erasing it..? when you quit your app, blitz erases it all for you..
For normal arrays use:
Dim ship(0)
..which makes it very small.
For 'Blitz arrays' use something like this:
Function blah()
Local ship[19]
;..do stuff to ships
End Function ; array is killed here
OR
Type arraycontainer
Field ship[19]
End Type
ac.arraycontainer = new arraycontainer
;...
Delete ac
Thanks Beaker,
That's just what I was looking for.
mudcat
I use the array container method but what is this good for "Dim ship(0)". Surely you can't add anything to it or is it a dynamic length?
Grey Alien,
what it is good for is to shrink ur array to smallest when ur done with it since u can't just cancle a standard arry.That's one of the answers to my question.