ARRAYSET |
Description In a one-dimensional array, sets the elements in a specified index range to a value. Useful for initializing an array after a call to ArrayNew.
Returns True, on successful completion.
Category Array functions
Function syntax
    ArraySet(array, start_pos, end_pos, value)
See also ArrayNew; "Populating arrays with data" in Chapter 5, "Using Arrays and Structures," in ColdFusion MX Developer's Guide
History ColdFusion MX: Changed behavior: this function can be used on XML objects.
Parameters
Example
    <h3>ArraySet Example</h3>

    <!--- Make an array --->
    <cfset MyNewArray = ArrayNew(1)>
    <!--- ArrayToList does not function properly if the Array has not been
    initialized
    with ArraySet --->
    <cfset temp = ArraySet(MyNewArray, 1,6, "Initial Value")>

    <!--- set some elements --->
    <cfset MyNewArray[1] = "Sample Value">
    <cfset MyNewArray[3] = "43">
    <cfset MyNewArray[6] = "Another Value">
    ...

ARRAY |

Name of an array.

START_POS |

Starting index position of range to set.

END_POS |

Ending index position of range to set. If this value is greater than array length, ColdFusion adds elements to array.

VALUE |

Value to which to set each element in the range.