[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] fatal: split: second argument is not an array
From: |
Hermann Peifer |
Subject: |
Re: [bug-gawk] fatal: split: second argument is not an array |
Date: |
Fri, 22 Mar 2013 08:36:12 -0300 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 |
On 2013-03-22 5:21, Aharon Robbins wrote:
I'm afraid you're misunderstanding. Any reference to a previously
non-existent element creates it *as a scalar* with an untyped value (which
acts as the null string or zero). (...)
This is how awk has worked since The Beginning....
Hi Arnold,
Thanks for the explanations.
My thinking was that in The Beginning, array elements could only be
scalars, so creating new elements unconditionally as a scalar was fine.
Nowadays, the situation is somewhat different, as there is the new
"arrays of arrays" concept. So the rule to create new elements
unconditionally as a scalar might have to be reconsidered..
My thinking was obviously wrong and in any case, initialising the
subarray gets me around the issue.
Thanks again for your time,
Hermann
PS (an unrelated issue):
There is a small typo in the NEWS file, which states "This consierably
reduces..."