Creating an Array: Difference between revisions

no edit summary
m (→‎{{header|ColdFusion}}: Added lang tags, made up a tag name)
No edit summary
Line 498:
=={{header|LSE64}}==
<lang lse64>10 myArray :array</lang>
 
=={{header|Mathematica}}==
Creating an array is simply done with Set (=). An array can contain anything, and can have different Heads. A formule like 2+3x+x^2 is an array: Plus[2,Times[3,x],Times[2,Power[x,2]]]. Each list has different heads (Plus,Times, Power). Arrays are made as follows:
<lang Mathematica>
a={3,1,4,1,5,9,2,6,5};
b={"This","is","a","list","of","strings"};
c={"text can",3,"be","mixed","with",4,"numbers"};
d={Pi,{1,"list in list"},4,a,True};
</lang>
Note that arrays can have any dimensions, and don't have to be rectangular (every (sub)element can have different length).
 
=={{header|MAXScript}}==
1,111

edits