[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Another typeof() issue
From: |
Hermann Peifer |
Subject: |
Re: [bug-gawk] Another typeof() issue |
Date: |
Tue, 23 Jun 2015 01:04:30 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 2015-06-22 22:07, Aharon Robbins wrote:
Does this look better?
$ cat bar.awk
BEGIN {
print typeof(x)
print typeof(a[1])
a[1][2]
}
$ ./gawk -f bar.awk
untyped
scalar_u
gawk: bar.awk:4: fatal: attempt to use scalar `a["1"]' as an array
This distinguishes between "never used" and "scalar but no value" (scalar_u).
This looks much better to me. If I understand it right:
- 'untyped' is the equivalent of the debugger's 'untyped variable'
(never used, can either turn into scalar or into array)
- 'scalar_u' is what the debugger calls 'uninitialized scalar' (scalar
but no value, can turn into scalar_s or scalar_n, but never into an array).
In the meantime I have pushed a bunch of fixes from the other bug
reports.
Thanks. The fixes work fine.
Hermann
- [bug-gawk] Another typeof() issue, Hermann Peifer, 2015/06/22
- Re: [bug-gawk] Another typeof() issue, Aharon Robbins, 2015/06/22
- Re: [bug-gawk] Another typeof() issue,
Hermann Peifer <=
- Re: [bug-gawk] Another typeof() issue, Hermann Peifer, 2015/06/23
- Re: [bug-gawk] Another typeof() issue, Aharon Robbins, 2015/06/26
- Re: [bug-gawk] Another typeof() issue, Hermann Peifer, 2015/06/28
- Re: [bug-gawk] Another typeof() issue, arnold, 2015/06/29
- Re: [bug-gawk] Another typeof() issue, Hermann Peifer, 2015/06/29
- Re: [bug-gawk] Another typeof() issue, Aharon Robbins, 2015/06/29
- Re: [bug-gawk] Another typeof() issue, Hermann Peifer, 2015/06/29
- Re: [bug-gawk] Another typeof() issue, Andrew J. Schorr, 2015/06/29
- Re: [bug-gawk] Another typeof() issue, Aharon Robbins, 2015/06/29
- Re: [bug-gawk] Another typeof() issue, Aharon Robbins, 2015/06/29