Anonymous user
Apply a callback to an array: Difference between revisions
→{{header|C}}: + AWK
(gnu octave -> octave 1) |
(→{{header|C}}: + AWK) |
||
Line 90:
array[ +4] = +16
=={{header|AWK}}==
$ awk 'func psqr(x){print x,x*x}BEGIN{split("1 2 3 4 5",a);for(i in a)psqr(a[i])}'
4 16
5 25
1 1
2 4
3 9
=={{header|C}}==
|