[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GAWK does not like "default" as an argument name
From: |
Andrew J. Schorr |
Subject: |
Re: GAWK does not like "default" as an argument name |
Date: |
Mon, 31 Jul 2006 10:50:53 -0400 |
User-agent: |
Mutt/1.4.2.1i |
On Sun, Jul 30, 2006 at 11:58:53PM -0400, Paul Jarc wrote:
> "Nielsen, Dan \(GE, Corporate\)" <address@hidden> wrote:
> > # ZERROR7.AWK - GAWK doesn't like "default" in argument list
> > # Change "default" to "Default" or "_default" and it works fine.
> > # How to run: GAWK -f C:\AWK\ZERROR7.AWK
> > BEGIN { x() }
> > function x(default) { printf("ok") }
>
> "default" is a keyword of the language, like "function" or "if".
> Keywords can't be used as identifiers.
I think "default" should be a keyword only if gawk was built
with 'configure --enable-switch'. My tests here confirm that your
script should work fine if the "switch" statement is not enabled.
Does that correspond with your experience?
Regards,
Andy