61 - Array Literals
An array literal is a comma-separated list of one or more expressions, enclosed in square brackets […]
-
It is always a statically-sized memory array whose length is the number of expressions
-
The base type of the array is the type of the first expression on the list such that all other expressions can be implicitly converted to it. It is a type error if this is not possible.
-
Fixed size memory arrays cannot be assigned to dynamically-sized memory arrays
- Comma-separated List Within
[]
- Statically-sized
- Length = # Expressions
- Type = First Element
- Others Convertible
- No Assignment to Dynamically-size Arrays