bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Missing double quotes in SYMTAB example in docs


From: Lorenz
Subject: Re: [bug-gawk] Missing double quotes in SYMTAB example in docs
Date: Mon, 11 Jul 2016 08:21:39 +0000

Jaromir Obr wrote:

>Hi,
>
>in
>https://www.gnu.org/software/gawk/manual/gawk.html#index-differences-in-awk-and-gawk_002c-SYMTAB-variable
>there is an example:
>
># Indirect multiply of any variable by amount, return result
>
>function multiply(variable, amount)
>{
>    return SYMTAB[variable] *= amount
>}
>
>
>There are missing double quotes around variable, aren't they ?
>(expected is return
>SYMTAB["variable"] *= amount

no there aren't.

perhapse the following lineup of equivalent expressions makes that
clearer

myVar *= amount
SYMTAB["maVar"] *= amount
multiply("myVar", amount)
-- 

Lorenz




reply via email to

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