Gambas Documentation - /lang/array

/lang/array

# Inline Arrays

Array = [ Expression [ , ... ] ]

Creates an array and returns it.

The type of all arguments are tested. If they are all the same, or if they can be converted to the same native datatype, then a specific array is returned: String[] if there are only String values, Float[] is there are only Float values, and so on...

Otherwise, a Variant[] is returned.

### Examples

    PRINT [ "A", "B", "C" ].Join("/")

    A/B/C

    PRINT Object.Type([ 2.4, 3, 3.2 ])

    Float[]

### Examples

    PRINT Object.Type([ "2.4", 3, 3.2 ])

    Variant[]

### See also

- Inline Collections

- Native Arrays