SplitScript reference / Language / array indexing

array indexing

syntax

array[index]

Reads an array element.

The receiver may be [T] or [T; N], the index is inferred as u32, and the result has type T. WebAssembly performs the bounds check.

Examples

Read an array element

let opcode = bytes[1]