bug-bash
[Top][All Lists]
Advanced

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

Re: inconsistency with "readonly" and scope


From: Chet Ramey
Subject: Re: inconsistency with "readonly" and scope
Date: Thu, 12 Apr 2012 16:32:10 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

On 4/12/12 4:21 PM, dethrophes wrote:

> I don't think it helps me but thanks for the try.
> I would say zhats correct behavior. the code in the functions is only
> executed when you call the functions. So the first executed readonly
> variable is preserved.
> Anyway my problem isn't with how readonly is preserved, its with how when I
> set readonly the variable seems to have a limited context even if I declare
> it explicitly global.

Simple variables or associative arrays?  If it's associative arrays
with compound assignments, look at

http://lists.gnu.org/archive/html/help-bash/2012-04/msg00000.html


-- 
``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]