CountElements (array)

Result Type: Number

Definition: Returns the number of elements in the array.


    let x = CreateArray()
    let x[1] = "foo"
    let x[2] = "bar"
    let c = CountElements(x)

c will be 2.

Availability:  MWScript in MoneyWorks Gold 8.1.8 and later

See Also:

CreateArray: Create an empty associative array

DeleteElement: Remove a key from an associative array

ElementExists: Check if a key exists in an associative array

ParamsFromArray: Expand array values to a variable parameter list