Reference/Var: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
(→Var) |
mNo edit summary |
||
| Line 13: | Line 13: | ||
StrCpy $example2 "another example value" | StrCpy $example2 "another example value" | ||
FunctionEnd</highlight-nsis> | FunctionEnd</highlight-nsis> | ||
''Command introduced with NSIS v2.0'' | |||
Latest revision as of 11:27, 3 June 2013
Var
[/GLOBAL] var_name
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.
Var example Function testVar Var /GLOBAL example2 StrCpy $example "example value" StrCpy $example2 "another example value" FunctionEnd
Command introduced with NSIS v2.0