Extensions |
array array.new ( number i1, i2, ... in [, string type] )
Creates and returns a new static array object of one or more dimensions. If no type is specified, then the element type of the array will be a double.
Memory for the array is pre-allocated immediately, and is equal to the product of all the dimension sizes and the size of the storage type. Elements stored in the static array will never be collected by the garbage collector, until the entire object is collected.
The acceptable storage types are: char, byte, short, int, long, float, and double. Storage types cannot be changed after the array is created.
Parameters
in | One or more dimension sizes |
type | Optional. The storage type of the elements |
Return Values
array | A new static array object |
Error Conditions
If there is not enough available memory in the system to satisfy the reqested size, this function will signal an error.
Example
Copyright 2010 Justin Aquadro