array_height_2d

Returns the height of a 2D array.

Syntax:

array_height_2d(array);


Argument Description
array The array to check.


Returns: Real


Description

With this function you can get the height (number of entries) of a the first dimension of a 2D array. You supply the array to check and the output from the function tells you how many initial entries it contains. You can get the number of entries for the second dimension of the array using the function array_length_2d.


Example:

for (var i = array_height_2d(a); i > -1; i--;)
   {
   for (var j = array_length_2d(a, i); j > -1; i--;)
      {
      a[i, j] = -1;
      }
   }

The above code will loop through a 2D array and set each entry to -1.


Back: Arrays
Next: is_array
© Copyright YoYo Games Ltd. 2018 All Rights Reserved