Native Arrays

Gambas has a predefined array class for each native datatype.

The name of these classes is the name of the datatype they store followed by an opened and a closed bracket.

Boolean[] Array of Boolean values.
Byte[] Array of Byte values.
Short[] Array of Short values.
Integer[] Array of Integer values.
Long[] Array of Long values.
Single[] Array of Single values.
Float[] Array of Float values.
Date[] Array of Date values.
String[] Array of String values.
Object[] Array of Object values.
Pointer[] Array of Pointer values.
Variant[] Array of Variant values.

You can initialize an array, or create an array inside an expression with the [ ... ] operator. See Inline Arrays for more information.

In Gambas 3, any datatype has an array equivalent. For example: String[][], for an array of string arrays ; Collection[] for an array of collections ; and so on.

The class of non native datatype arrays is created on the fly by the interpreter.