array_length_1d


Description

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.


Syntax:

array_length_1d(array_index);


Arguments:

Argument Description
array_index The index of the array to check.

Returns:

Real


Example:

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.