bug-bash
[Top][All Lists]
Advanced

[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.



reply via email to

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