[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] gawk bug: IGNORECASE=0 does not work
From: |
Aharon Robbins |
Subject: |
Re: [bug-gawk] gawk bug: IGNORECASE=0 does not work |
Date: |
Wed, 04 Feb 2015 22:07:21 +0200 |
User-agent: |
Heirloom mailx 12.5 6/20/10 |
Hi Jeff - Thanks for your bug report. Apologies for not
replying sooner.
I do agree it's a bug.
Andy - I think your patch is the right way to go. Please sync with the
repo, then push to gawk-4.1-stable and merge to master. Or if you can't
do it, let me know and I'll get to it.
> However, this result still seems odd to me:
>
> bash-4.2$ ./gawk 'BEGIN { IGNORECASE = "0"; if ( "a" == "A" ) print "match";
> else print "no match" }'
> match
>
> Is this truly the desired behavior?
Yes. The definition of ``true'' is awk is ``non-zero OR non-null.''
Thus "0" is just as true as "true" and even "false".
The doc also makes this very clear, even pointing out that "0" is true.
Thanks,
Arnold