[Top][All Lists]

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

Re: [Help-bash] make function local

From: Chet Ramey
Subject: Re: [Help-bash] make function local
Date: Thu, 16 Apr 2015 13:59:59 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 4/16/15 11:43 AM, Dan Douglas wrote:
> I thought Bash always first splits the identifier from the subscript,
> then checks which attributes the variable has set. If it has the
> associative array attribute plus a subscript then the subscript is
> only processed for expansions and the resulting string is used as the
> key. If the associative array attribute is not set then the subscript
> is processed for expansions and the resulting string is passed on to
> arithmetic evaluation.
> Am I following the discussion correctly? i.e. if you have
> `a[b[text]]`, the treatment of `text` is entirely determined by b's
> attributes.

Yes, that's correct.  In the case I'm talking about, we're only concerned
with indexed arrays and the consequent arithmetic evaluation.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

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