Skip to end of metadata
Go to start of metadata

Multidimensional arrays in Boo

When declaring a variable or a field as a multidimensional array, use this syntax:

When creating a brand spanking new multidimensional array, use this syntax:

Set and retrieve data from the array:

This shows looping over the array to set or get values:

The whole code together produces this output:

100
01 02 03 04
05 06 07 08
09 10 11 12
13 14 15 16
17 18 19 20
21 22 23 24

See also Lists and Arrays. Slicing works for multidimensional arrays too.

  • No labels