Content deleted Content added
→C#: fixed syntax |
m →Awk |
||
Line 13:
For example:
<source lang=
phonebook["Sally Smart"] = "555-9999"
phonebook["John Doe"] = "555-1212"
Line 21:
You can also loop through an associated array as follows:
<source lang=
for (name in phonebook) {
print name, " ", phonebook[name]
Line 31:
Multi-dimensional associative arrays can be simulated in standard Awk using concatenation and e.g. SUBSEP:
<source lang=
{ # for every input line
multi[$1 SUBSEP $2]++;
|