I am reading Introduction to Arrays for nawk
It says:
Arrays in awk superficially resemble arrays in other programming languages; but there are fundamental differences. In awk, you don't need to specify the size of an array before you start to use it.
Then whats the limit of memb开发者_JAVA百科ers I can have in that array? How do I know that? And is this error-pron? (because I know it cannot be infinite :D)
nawk has limits on various things from experience although I have no idea what they are and can't find a reference. gawk however doesn't so if you want security against hitting limits, try gawk. Ref here:
http://oreilly.com/catalog/unixnut3/chapter/ch11.html#ch11_09.htm
There is no maximum size since in Awk arrays are allowed to grow and shrink as necessary. It is limited by your PC.
精彩评论