array_length_1d(array);
Argument | Description |
---|---|
array | The array to check. |
Returns: Real
With this function you can get the length (number of entries) of
a 1D array. For 2D arrays you should be using the array_height_2d and array_length_2d functions.
WARNING!: If the array has over 32,000 entries this
function will return an erroneous value and should not be
used.
for (var i = array_length_1d(a) - 1; i > -1;
i--;)
{
a[i] = -1;
}
The above code will loop through an array and set each entry to -1.