[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] array initialization
From: |
Andrew J. Schorr |
Subject: |
Re: [bug-gawk] array initialization |
Date: |
Fri, 4 Jan 2019 17:35:48 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Jan 04, 2019 at 05:28:02PM -0500, Andrew J. Schorr wrote:
> Based on some debugging, I believe one can actually get a "null" (typeless)
> array
> like so:
> split("", y)
Well, oops, this approach doesn't seem to work for subarrays:
bash-4.2$ ./gawk 'BEGIN {split("", y[1]); print isarray(y)}'
gawk: cmd. line:1: fatal: split: second argument is not an array
So using "split" does not seem to work in the general case.
Is there a way to do this properly? This two-step process seems to work:
y[1][1] = 0
split("", y[1])
But that's rather cumbersome...
Regards,
Andy
- [bug-gawk] array initialization, Andrew J. Schorr, 2019/01/04
- Re: [bug-gawk] array initialization,
Andrew J. Schorr <=
- Re: [bug-gawk] array initialization, Wolfgang Laun, 2019/01/05
- Re: [bug-gawk] array initialization, Andrew J. Schorr, 2019/01/05
- Re: [bug-gawk] array initialization, Andrew J. Schorr, 2019/01/05
- Re: [bug-gawk] array initialization, arnold, 2019/01/05
- Re: [bug-gawk] array initialization, Andrew J. Schorr, 2019/01/05
- Re: [bug-gawk] useless array length abstraction, Andrew J. Schorr, 2019/01/05
- Re: [bug-gawk] useless array length abstraction, arnold, 2019/01/06
- Re: [bug-gawk] useless array length abstraction, Andrew J. Schorr, 2019/01/06
- Re: [bug-gawk] useless array length abstraction, arnold, 2019/01/06
- Re: [bug-gawk] useless array length abstraction, Andrew J. Schorr, 2019/01/06