Comparison of programming languages (associative array): Difference between revisions

Content deleted Content added
m Haskell: per WP:HYPHEN, sub-subsection 3, points 3,4,5, replaced: commonly- → commonly using AWB (8564)
Awk: TAWK seems to no longer be maintained (and it wasn't notable to begin with)
Line 27:
You can also check if an element is in the associative array, and delete elements from an associative array.
 
Multi-dimensional associative arrays can be implementedsimulated in standard Awk using concatenation and e.g. SUBSEP:
 
<source lang=Text>
Line 39:
print arr[1], arr[2], multi[x];
}
}
</source>
 
Thompson AWK [http://www.tasoft.com/tawk.html] provides built-in multi-dimensional associative arrays:
 
<source lang=Text>
{ # for every input line
multi[$1][$2]++;
}
#
END {
for (x in multi)
for (y in multi[x])
print x, y, multi[x][y];
}
</source>