Final note: In fact, it has been established (on this newsgroup as well as >> empirically by me and others) that if the indices are small integers, you
get sorting for free (in GAWK, which, as noted, is all we care about). So, >> you don't even really need to mess with PROCINFO[]...
Are you referring to the idea of just replacing the above for + if
structure with:
for (i in rank) {
}
and relying on the small integer indices being hashed in order?
Where is that documented? The manual reiterates that this is not
specified: "By default, the order in which a for (indx in array) loop
scans an array is not defined; it is generally based upon the internal >implementation of arrays inside awk."
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,064 |
Nodes: | 10 (0 / 10) |
Uptime: | 159:14:20 |
Calls: | 13,691 |
Calls today: | 1 |
Files: | 186,936 |
D/L today: |
7,069 files (2,119M bytes) |
Messages: | 2,411,312 |