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: david kerns
Subject: Re: [bug-gawk] Missing double quotes in SYMTAB example in docs
Date: Sun, 10 Jul 2016 13:25:49 -0700

if it used less descriptive names, say a and b, would you still say it needs double quotes?

# Indirect multiply of any variable by amount, return result
function multiply(a, b)
{
    return SYMTAB[a] *= b
}

On Sun, Jul 10, 2016 at 10:24 AM, Jaromir Obr <address@hidden> 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

Regards

Jaromir


reply via email to

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