bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Array literal


From: arnold
Subject: Re: [bug-gawk] Array literal
Date: Sun, 26 May 2019 02:50:27 -0600
User-agent: Heirloom mailx 12.5 7/5/10

Steven Penny <address@hidden> wrote:

> On Fri, May 24, 2019 at 11:39 PM Wolfgang Laun wrote:
> > If anything, a built-in function
> > aset( <variable>, <expression>... )
> > with the obvious semantics might be much easier to implement.
>
> That is a good idea. Something like "aset" or "anew" as a variadic function
> similar to "sprintf" would be great:
>
>     anew(dd, "aa", "bb", "cc")
>     dd[2] == "bb"

This is a perfect candidate for a new extension function, that should
not be that hard to create. For information and examples see
https://www.gnu.org/software/gawk/manual/html_node/Dynamic-Extensions.html#Dynamic-Extensions

Arnold



reply via email to

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