Reference/Var: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(Created page with "=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 ...")
 
Line 1: Line 1:
=Var=
=Var=


'''[/GLOBAL] var_name'''
[/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.
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.

Revision as of 13:05, 25 November 2011

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