RosettaCodeData/Task/Create-a-two-dimensional-array-at-runtime/MAXScript/create-a-two-dimensional-array-at-runtime.max

12 lines
225 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
a = getKBValue prompt:"Enter first dimension:"
b = getKBValue prompt:"Enter second dimension:"
arr1 = #()
arr2 = #()
arr2[b] = undefined
for i in 1 to a do
(
append arr1 (deepCopy arr2)
)
arr1[a][b] = 1
print arr1[a][b]