开发者

Array size in nawk

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜