RosettaCodeData/Task/Arrays/Dao/arrays.dao
Ingy döt Net 764da6cbbb CDE
2013-04-10 16:57:12 -07:00

10 lines
261 B
Text

# use [] to create numeric arrays of int, float, double or complex types:
a = [ 1, 2, 3 ] # a vector
b = [ 1, 2; 3, 4 ] # a 2X2 matrix
# use {} to create normal arrays of any types:
c = { 1, 2, 'abc' }
d = a[1]
e = b[0,1] # first row, second column
f = c[1]