Hi,
I’m trying to fill a two dimensional array with a nested for loops.
I would like to get the following:
((“0,0”,“0,1”,“0,2”),(“1,0”,“1,1”,“1,2”))
My attemp is this:
#{
let i = 0
let j = 0
let col-num = 3
let row-num = 2
let values = while i < row-num {
(while j < col-num{
let v = str(i) + "," + str(j)
(v,)
j = j + 1
},)
i = i + 1
}
values
}
And i got:
But I don’t find any documentation about it.
Thanks a lot!
#{
let i = 0
let col-num = 3
let row-num = 2
let values = while i < row-num {
let j = 0
(while j < col-num{
let v = str(i) + "," + str(j)
(v,)
j = j + 1
},)
i = i + 1
}
values
}