Var can now be used in sections and functions, but only with the /GLOBAL flag
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4211 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
f5105a50b1
commit
68dc7f9f7e
4 changed files with 36 additions and 7 deletions
|
@ -10,14 +10,17 @@ User variables can be declared with the \R{var}{Var} command. You can use these
|
|||
|
||||
\S2{var} Var
|
||||
|
||||
\c var_name
|
||||
\c [/GLOBAL] var_name
|
||||
|
||||
Declare a user variable. Allowed characters for variables names: [a-z][A-Z][0-9] and '_'. Variables cannot be declared in sections or functions.
|
||||
Declare a user variable. Allowed characters for variables names: [a-z][A-Z][0-9] and '_'. All defined variables are global, even if defined in a section or a function. To make this clear, variables defined in a section or a function must use the /GLOBAL flag. The /GLOBAL flag is not required outside of sections and functions.
|
||||
|
||||
\c Var example
|
||||
\c
|
||||
\c Function testVar
|
||||
\c Var /GLOBAL example2
|
||||
\c
|
||||
\c StrCpy $example "example value"
|
||||
\c StrCpy $example2 "another example value"
|
||||
\c FunctionEnd
|
||||
|
||||
\S1{varother} Other Writable Variables
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue