Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 895 Bytes

Array Literals.md

File metadata and controls

25 lines (19 loc) · 895 Bytes

An array literal is a comma-separated list of one or more expressions, enclosed in square brackets […]

  1. It is always a statically-sized memory array whose length is the number of expressions

  2. 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.

  3. Fixed size memory arrays cannot be assigned to dynamically-sized memory arrays


Slide Screenshot

061.jpg


Slide Deck

  • Comma-separated List Within []
  • Statically-sized
  • Length = # Expressions
  • Type = First Element
  • Others Convertible
  • No Assignment to Dynamically-size Arrays

References