Why not add reference and multi-dimensional array to awk language
I'm wondering is there any implementation of awk that has re开发者_如何学Goference(like in perl) or something similar to build complex data structure? Adding such feature would make awk more powerful. Will posix standard adds such kind of feature in future?
Multidimensional arrays are supported in gawk.
From the manual:
{
if (max_nf < NF)
max_nf = NF
max_nr = NR
for (x = 1; x <= NF; x++)
vector[x, NR] = $x
}
References are not, and I think referencing is not "the awk way".
HTH!
精彩评论