arraySet

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.

arraySet(array, start_pos, end_pos, value) → returns boolean

Member Function Syntax

someArray.set(start_pos, end_pos, value)

Argument Reference for the arraySet function

array

Required: Yes

start_pos

Required: Yes

end_pos

Required: Yes

value

Required: Yes

Examples sample code invoking the arraySet function


Tag Syntax

<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")> 
  <cfdump var="#myNewArray#" />   

Fork me on GitHub