Jump to content

Clear an array's elements


Recommended Posts

I want to clear the contents of an array.  I have read that you can use:

testarray = Utility.CreateFormArray(40,none)

to create an array and that later you can do:

testarray = Utility.CreateFormArray(0,none)

which seems to replace the array with a zero (i.e. non-existent?) size array of the same name,

presumably then I can create the array, fiddle with it, set to to zero size and then recreate it with the original size and all empty again?

testarray = Utility.CreateFormArray(40,none)
	<stuff happens>
testarray = Utility.CreateFormArray(0,none)
testarray = Utility.CreateFormArray(40,none)

if so, can I miss out the:

testarray = Utility.CreateFormArray(0,none)

line?

Would the Utility.CreatFormArray() function work to zero the array and recreate it, if 'testarray' had already been declared as a property?

 

diziet

Link to comment
Share on other sites

Honestly, I do not know what happens.  I would think that CreateFormArray would just create a new array and assign it to the variable.  The fact that ResizeFormArray exists lends credence to this idea.  Only way to really know would be to test it out.  Or hope that someone who has used this function replies to this thread.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...