array_create

Create an array of a given size (and populate it with a default value).

Syntax:

array_create(size, [value]);


Argument Description
size The size of the array to create.


Returns: Array (Handle)


Description

With this function you can create an array of a given size. You tell the function the length of the array to create, and it will return the "handle" for the array which you can then assign to a variable. Arrays created in this way will have each entry initialised to 0.


Example:

instance_array = array_create(100);

The above code will create a new array of 100 entries and assign it to the variable "instance_array".


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