Novelty scripting reference > Types > array<T>

array<T>

array is a template class for creating arrays of any type. array is used in some script functions that return a list of things.

Constructors

array<T>()
array<T>(uint size)


Index operator

T& [uint index]
const T& [uint index] const
Returns a reference to an item in the array.


Methods

uint Length() const
Returns the length of the array.

void Resize(uint size)const
Resize the array.


Sample

// Print the names of all objects in the scene
array<Object@> List;
Scene.EnumerateObjects(List);
foreach (Object@ o in List)
	Print(o.name);

See also: foreach, Scene.EnumerateObjects


Back to top