RosettaCodeData/Task/Arrays/Nanoquery/arrays.nanoquery

19 lines
326 B
Plaintext

// create a fixed-length array (length 10)
arr = array(10)
// assign a value to the first position in the array and then display it
arr[0] = "hello, world!"
println arr[0]
// create a variable-length list
l = list()
// place the numbers 1-10 in the list
for i in range(1,10)
append l i
end
// display the list
println l