[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[4.1.4]: nested indirect function calls diagnosed as error.
From: |
Kaz Kylheku |
Subject: |
[4.1.4]: nested indirect function calls diagnosed as error. |
Date: |
Sat, 26 Mar 2022 09:27:26 -0700 |
User-agent: |
Roundcube Webmail/1.4.13 |
Hi!
GNU Awk 4.1.4 in Ubuntu 18 diagnoses the indicated line in the following
snippet.
Does this reproduce in current?
function okay(f1, f2, arg)
{
return @f1(arg)
}
function not_so_hot(f1, f2, arg)
{
return @f1(arg, @f2(arg)) # line 8: error here
}
function workaround(f1, f2, arg,
tmp)
{
tmp = @f2(arg)
return @f1(arg, tmp)
}
The diagnostic is:
gawk: gawkbug.awk:8: error: attempt to use non-function `f1' in function
call.
Though such nesting isn't described in the manual, it more or less
reasonably
follows from the composition of expressions, including regular, direct
function calls.
Cheers ...
- [4.1.4]: nested indirect function calls diagnosed as error.,
Kaz Kylheku <=