aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/set.txt
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-06-09 09:58:11 +1000
committerGravatar axel <axel@liljencrantz.se>2006-06-09 09:58:11 +1000
commitd79e8c7f62472c5f47871d1ad8351ce848b2c6b4 (patch)
treecaf23bc67fde6a3708634ab335c46af626c4401b /doc_src/set.txt
parentaf8cb6fe875898d9a8c2254361bed04583c35961 (diff)
Documentation updates, mostly corrections and cla<rifications to the docs for a few builtins
darcs-hash:20060608235811-ac50b-76b4fd54cb0911dd00f19f4a7c761f188d6ca068.gz
Diffstat (limited to 'doc_src/set.txt')
-rw-r--r--doc_src/set.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/doc_src/set.txt b/doc_src/set.txt
index 93e1d967..78d26183 100644
--- a/doc_src/set.txt
+++ b/doc_src/set.txt
@@ -38,10 +38,15 @@ expanding or assigning to an array variable, the index will be
calculated from the end of the array. For example, the index -1 means
the last index of an array.
+The scoping rules when creating or updating a variable are:
+
-# If a variable is explicitly set to either universal, global or local, that setting will be honored. If a variable of the same name exists in a different scope, that variable will not be changed.
-# If a variable is not explicitly set to be either universal, global or local, but has been previously defined, the previos variable scope is used.
-# If a variable is not explicitly set to be either universal, global or local and has never before been defined, the variable will be local to the currently executing functions. If no function is executing, the variable will be global.
+The exporting rules when creating or updating a variable are identical
+to the scoping rules for variables:
+
-# If a variable is explicitly set to either be exported or not exported, that setting will be honored.
-# If a variable is not explicitly set to be exported or not exported, but has been previously defined, the previous exporting rule for the variable is kept.
-# If a variable is not explicitly set to be either global or local and has never before been defined, the variable will not be exported.
@@ -65,7 +70,7 @@ variable assignments where sucessfully performed, with a non-zero exit
status otherwise. In query mode, the exit status is the number of
variables that where not found. In erase mode, set exits with a zero
exit status in case of success, with a non-zero exit status if the
-commandline was invalid, if the variable was readprotected or if the
+commandline was invalid, if the variable was write-protected or if the
variable did not exist.
\subsection set-example Example