[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
inconsistency with "readonly" and scope
From: |
Greg Wooledge |
Subject: |
inconsistency with "readonly" and scope |
Date: |
Wed, 11 Apr 2012 14:50:14 -0400 |
User-agent: |
Mutt/1.4.2.3i |
"declare" when used in a function acts like "local", and creates a variable
with scope local to that function. So does "declare -r". But "readonly",
which is otherwise the same as "declare -r", creates variables with global
scope.
Is this intended?
Tested with 2.05b, 3.something, and 4.2.20.
- inconsistency with "readonly" and scope,
Greg Wooledge <=
- Re: inconsistency with "readonly" and scope, dethrophes, 2012/04/11
- Re: inconsistency with "readonly" and scope, Chet Ramey, 2012/04/12
- Re: inconsistency with "readonly" and scope, dethrophes, 2012/04/12
- Re: inconsistency with "readonly" and scope, Steven W. Orr, 2012/04/12
- Re: inconsistency with "readonly" and scope, dethrophes, 2012/04/12
- Re: inconsistency with "readonly" and scope, Chet Ramey, 2012/04/12
- Re: inconsistency with "readonly" and scope, Steven W. Orr, 2012/04/12
- Re: inconsistency with "readonly" and scope, dethrophes, 2012/04/12
- Re: inconsistency with "readonly" and scope, Chet Ramey, 2012/04/12
- Re: inconsistency with "readonly" and scope, Chet Ramey, 2012/04/12