Arrays: Difference between revisions
m
→{{header|J}}
Puppydrum64 (talk | contribs) |
m (→{{header|J}}) |
||
Line 4,324:
klXno</lang>
Because arrays are so important in J, a large portion of the language applies to this topic.
Note also that J's arrays are (with some obscure exceptions) "constants". We can append to an existing array, creating a new array, but if we kept a reference to the original it would have remained unchanged.
<lang J> A=: 7 11
B=: A, 9 5
B
7 11 9 5
A
7 11</lang>
Thus, in recent versions of J, special syntax was introduced to refer to a value while discarding the reference: <lang J> A=: 2 4 6 8
B=: A_:, 1 3 9 5
B
2 4 6 8 1 3 9 5
A
|value error: A</lang>
=={{header|Java}}==
|