SetElements Function

Syntax

SetElements(Array array, PropertyObject value, [String range])

Return Value

This function always returns 0.

Purpose

This function assigns the passed value to all indices of the passed array. If an index range is specified, only elements in the range are assigned the passed value.

Parameters

array as Array

An array to which the value should be assigned.

value as PropertyObject

The value which is to be assigned to the specified parts of the array.

range as String

An optional parameter specifying the range string specifying the indices of the array to which the value should be assigned. For example, the range "[0..2]" specifies elements [0], [1], and [2]. If unspecified, the range is assumed to be the whole array. Refer to the "Brackets" section in the Expression Operators help topic for more information on specifying an index range.