From 737972be2f326bfffb9f1db43a0f9f99bad49e58 Mon Sep 17 00:00:00 2001 From: Jan Kanis Date: Sat, 29 Dec 2012 16:39:41 +0100 Subject: clarify docs on variable scope in functions --- doc_src/set.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc_src/set.txt') diff --git a/doc_src/set.txt b/doc_src/set.txt index 7a2faf08..63a15d71 100644 --- a/doc_src/set.txt +++ b/doc_src/set.txt @@ -44,7 +44,7 @@ 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 previous 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. +-# 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 function. Note that this is different from using the \c -l or \c --local flag. If one of those flags is used, the variable will be local to the most inner currently executing block, while without these the variable will be local to the function. 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: -- cgit v1.2.3