[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] 2 questions
From: |
arnold |
Subject: |
Re: [bug-gawk] 2 questions |
Date: |
Mon, 05 Nov 2012 05:59:20 -0700 |
User-agent: |
Heirloom mailx 12.4 7/29/08 |
Hello.
Denis Shirokov <address@hidden> wrote:
> Is there a way to request some useful feature in gawk? It's about
> special array which will accessible in function body. It should be
> autodefined from 1 to n - and contain all input parameters given
> function when its calling from somewhere. for example:
> abc(10,11)
>
> func abc(p0,p1,p2) {
> # ARRAY[1]==10; ARRAY[2]==11; !(3 in ARRAY) - 3 not present in ARRAY
> because only 2 parameters given
> # ARRAY[0]==2 (two parameters given)
> # ARRAY[""]=="abc" (function name itself)
I can understand why you might want this, but I don't think that it is
generally useful. You can use
if (p2 == "" && p2 == 0)
to konw that p2 is undefined.
Arnold
- Re: [bug-gawk] 2 questions, Eli Zaretskii, 2012/11/03
- Message not available
- Re: [bug-gawk] 2 questions, Denis Shirokov, 2012/11/05
- Re: [bug-gawk] 2 questions,
arnold <=
- Re: [bug-gawk] 2 questions, Denis Shirokov, 2012/11/05
- Re: [bug-gawk] 2 questions, Aharon Robbins, 2012/11/05
- Re: [bug-gawk] 2 questions, Denis Shirokov, 2012/11/05
- Re: [bug-gawk] 2 questions, Denis Shirokov, 2012/11/05
- Re: [bug-gawk] 2 questions, Denis Shirokov, 2012/11/05
- Re: [bug-gawk] 2 questions, Aharon Robbins, 2012/11/06
- Re: [bug-gawk] 2 questions, Eli Zaretskii, 2012/11/05