Array Creator

Array Name
Indexed Array Length
Index Value Ext
Index Style 1   2   3  
Add Numerical Values Yes   No   

Coding large arrays can be a bit of a repetitive chore, the Array Creator is a handy script that will speed up this process.

When using the numerical value option enter the array length and an index value.
A number is then appended to the index value starting at 000.
A second value can also be added after the number by entering in the second textbox, if this is not required leave the box blank.

If the numerical value option is not used each individual array index value is typed in the text field, you can then either click the "Manual Enter" button or press the "Return" key to confirm your index value.

There are a few different layouts that can be used when creating an array, below are 6 ways that the Array Creator can code an array.

1) Indexed Values

Style 1

Array_Name=new Array("aaa_000", "aaa_001")

Style 2

Array_Name=new Array()
Array_Name[0]="aaa_000"
Array_Name[1]="aaa_001"

Style 3

My_Array = new Array()
My_Array[My_Array.length]="aaa_000"
My_Array[My_Array.length]="aaa_001"
The 3 examples above are typical of arrays where the only difference between the index values are the numerically ordered numbers appended to the value.

The following 3 examples are for arrays with unique index values.

Non-Indexed Values

Style 1

Array_name=new Array("alpha", "bravo")

Style 2

Array_name=new Array()
Array_name[0]="alpha"
Array_name[1]="bravo"

Style 3

My_Array = new Array()
My_Array[My_Array.length]="alpha"
My_Array[My_Array.length]="bravo"