bug-gawk
[Top][All Lists]
Advanced

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

the wonder of "cannot assign to arbitrary elements"


From: Denis Shirokov
Subject: the wonder of "cannot assign to arbitrary elements"
Date: Sun, 12 Dec 2021 20:52:20 +0200

BEGIN{

        typeof( a )

        SYMTAB[ "a" ] = 1

        SYMTAB[ "b" ] = 2                                       # <- here will 
be an arbitrary element erro


}



could someone please inform me what's the difference between a and b ?
and how to avoid an error with 'a' ?

feature of accessing the content of the global variables for writes is useless.


commonly - the fatal "cannot assign to arbitrary elements" - is idea that's
does more harm than good. it's practically nullifies feature of write
access to the content
of global variables because it is better to perform direct value
writing instead of trying
to understand why(and where) gawk determinates an element as an
arbitrary element of SYMTAB.

as a gawk user i may say that without fatal "cannot assign to
arbitrary elements" - life was been really easier and nice
and gawk was been more flexible.

Kind Regrads
Denis



reply via email to

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