[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: print and printf() function not in FUNCTAB or PROCINFO
From: |
arnold |
Subject: |
Re: print and printf() function not in FUNCTAB or PROCINFO |
Date: |
Sun, 30 Jan 2022 04:17:46 -0700 |
User-agent: |
Heirloom mailx 12.5 7/5/10 |
Perhaps I should fix the user's guide then.
You can define functions with the same name as gawk extensions, in
different namespaces:
function foo::strtonum() { ... }
but not for the ones defined by POSIX.
Arnold
Wolfgang Laun <wolfgang.laun@gmail.com> wrote:
> On Sat, 29 Jan 2022 at 19:59, <arnold@skeeve.com> wrote:
>
> >
> > As Andy said, print and printf are not functions. They're reserved
> > words. If you do something like
> >
> > x = printf("hello\n")
> >
> > you will get a syntax error.
> >
>
> The GNU awk user's guide has a list of reserved words, called keywords. The
> list does not include print and printf. There may be a way to use all the
> "reserved identifiers" that are not keywords (such as the names of built-in
> functions) as names for user-defined objects but I haven't found one.
> Wolfgang Laun