Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Janis Papanagnou Newsgroups: comp.lang.awk Subject: Re: {} Questions Date: Thu, 22 Aug 2024 00:51:15 +0200 Organization: A noiseless patient Spider Lines: 20 Message-ID: References: <87o75mpaec.fsf@bsb.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Thu, 22 Aug 2024 00:51:16 +0200 (CEST) Injection-Info: dont-email.me; posting-host="b14ded77f45c6f5c4d97f9ffbed6545e"; logging-data="51622"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18RIwdEZBkJpW3N/PJYZoXj" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:9BIBFbB2WPrIX7jl4X+BNFmG26E= X-Enigmail-Draft-Status: N1110 In-Reply-To: Bytes: 1892 On 21.08.2024 20:57, Mike Sanders wrote: > Janis Papanagnou 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