Declaring arrays
Declaring one-dimensional arrays
Example
with console from std:io
var hello = {"Hello","world"} //type of the array is infered here, fooBar is now a string[2]
console.out(hello[0] + hello[1]) //Output: Hello world
var fooBar
fooBar[0] = 10 //type of the array is infered here, fooBar is now an int[*]
fooBar[1] = 20
var fib int[10] = {1,1,2,3,5,8,13,21,34,55}
var barFoo
barFoo[0] = null //type of the array is infered here, barFoo is now an object[*]
let text string[*] = console.in().split(" ")Declaring arrays with mixed types
Declaring multi-dimensional arrays
Example
Arrays of nullable types
Example
Last updated