[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Another typeof() issue
From: |
Aharon Robbins |
Subject: |
Re: [bug-gawk] Another typeof() issue |
Date: |
Mon, 29 Jun 2015 20:01:11 +0300 |
User-agent: |
Heirloom mailx 12.5 6/20/10 |
Hi.
The debugger runs as part of gawk itself, unlike most other debuggers
where the debugger is one process and the debuggee is another.
This is an artifact of the implementation. I traced down what's causing
it, and I might could even fix it, but I think I'll just document it instead.
Thanks,
Arnold
> Thanks for taking care. When looking at fields, the results of typeof()
> are somewhat different to my expectations, but maybe these are wrong (?).
>
> Hermann
>
> $ echo "abc 123" > data
> $ echo '{print typeof($1), typeof($2)}' > test.awk
>
> # Expected types: string strnum
> $ awk -f test.awk data
> strnum strnum
>
> # Debugging returns the opposite of the expected results
> $ printf 'w $1 \n w $2 \n r \n n \n n' | awk -D -f test.awk data
> Watchpoint 1: $1
> Watchpoint 2: $2
> Starting program:
> Stopping in Rule ...
> Watchpoint 1: $1
> Old value: ""
> New value: "abc"
> main() at `test.awk':1
> 1 {print typeof($1), typeof($2)}
> Watchpoint 2: $2
> Old value: ""
> New value: "123"
> main() at `test.awk':1
> 1 {print typeof($1), typeof($2)}
> strnum string # ???
- Re: [bug-gawk] Another typeof() issue, (continued)
- Re: [bug-gawk] Another typeof() issue, Hermann Peifer, 2015/06/22
- 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 <=
- Re: [bug-gawk] Another typeof() issue, Hermann Peifer, 2015/06/30