Sujet : Re: {} Questions
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.awkDate : 21. Aug 2024, 23:51:15
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <va5r13$1id6$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 21.08.2024 20:57, Mike Sanders wrote:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
[...]
>
(There's some caveat with arrays in the function argument list.)
Not sure why that would be, can you offer more detail?
Assuming you meant the statement in parenthesis... - Most prominent
one is the difference in parameter passing depending on the parameter
type; arrays are passed by reference, scalars by value. So any change
of array elements inside the function will change the array object on
the caller's side.
(There was also a case where awk got an issue in differentiating an
array from a scalar in functions, but details evade my memory at the
moment.)
Janis