Fixed-Length Arrays T[N]
Fixed-length arrays represent a single resource which stores N
elements of type T
.
Functions
self.length : int
Returns the length of the array.
Example:
int[5] a := ....;
int a_len := a.length; // 5
Operators
self[int] : (T + Unit)
Looks up a value in the vector. If it is within bonds, the value of type T stored at the index is returned. If not, Unit is returned.
self[int] := T
Attempts to assign T to the value at the specified index.
Specifications
- Size: N * Sizeof T
- Default Location: Stack
- Default Modifiers: Non-linear