bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: indirect function call issues (2)


From: Denis Shirokov
Subject: Re: indirect function call issues (2)
Date: Wed, 15 Jan 2025 22:36:51 +0200

>
> Is there any other way to run a script on gawk? =)
>


> Another question on a completely different topic — look:
>
> Example:
>
> BEGIN {
>     length(A[1])
>     print "A[1] : " typeof(A[1])
>
>     length(B)
>     print "B : " typeof(B)
> }
>
> Outputs:
>
>
> A[1] : untyped  B : unassigned
>
> In the first case, length() does not make A[1] a string or an array,
> leaving A[1] in the *untyped* state, whereas in the second case, for some
> reason, it makes the neutral B *unassigned*. Is this correct in light of
> the new (but long-awaited!) gawk feature allowing uninitialized subscripts
> in arrays without automatically making them *unassigned*?
>
> Is such behavior correct?
>
> Regards,
> Denis
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]