RosettaCodeData/Task/Collections/M2000-Interpreter/collections-1.m2000

15 lines
306 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
Module Arr {
\\ array as tuple
A=(1,2,3,4,5)
Print Array(A,0)=1
Print A
\\ add two arrays
A=Cons(A, (6,))
Print Len(A)=6
Print A
\\ arrays may have arrays, inventories, stacks as items
A=((1,2,3),(4,5,6))
Print Array(Array(A, 0),2)=3
}
Arr