5.8 Array Access
Array access is expressed by using an opening bracket [
followed by the index expression and a closing bracket ]
.
expr[indexExpr]
This notation is allowed with arbitrary expressions, but at typing level only certain combinations are admitted:
expr
is ofArray
orDynamic
andindexExpr
is ofInt
expr
is an abstract type which defines a matching array access