Gambas Documentation
Application Repository
Code Snippets
Compilation & Installation
Controls pictures
Deprecated components
Developer Documentation
Development Environment Documentation
Error Messages
Gambas Playground
How To's
Language Index
Language Overviews
Arithmetical Functions
Arithmetic Operators
Array Declaration
Assignment Operators
Binary Data Representation
Bits Manipulation Functions
Character Test Functions
Comparison methods
Complex numbers
Constant Declaration
Constant Expression
Conversion Functions
Datatype Functions
Date & Time Functions
Enumeration declaration
Error Management
Event Loop
Event Management
Events declaration
External Function Management
File & Directory Functions
File & Directory Paths
File mode syntax
Floating Point Numbers
Formatting functions
Gambas Object Model
Global Special Event Handlers
Integer numbers
Intrinsic Functions
Language Constants
Localization and Translation Functions
Local Variable Declaration
Logarithms & Exponentials Functions
Logical Operators
Loop Control Structures
Method Declaration
Miscellaneous Control Structures
Miscellaneous Functions
Native Arrays
Native Container Classes
Object & Class Management
Operator Evaluation Order
Predefined Constants
Process Management
Property Declaration
Random Numbers Functions
Special Methods
Stream & Input/Output functions
String Functions
String Operators
Structure declaration
Test Control Structures & Functions
Trigonometric Functions
User-defined formats
Using reserved keywords as identifiers
Variable Declaration
Last Changes
Search the wiki
To Do
Wiki License
Wiki Manual

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.