DADiSP Worksheet Functions > Function Categories > Variables > SETVARIABLE
Sets a global variable.
SETVARIABLE("name", value)
"name" |
- |
A string. The name of the global variable. |
value |
- |
A string, scalar, series or table, the value to assign. |
setvariable("DcOffset", mean(curr))
sets the variable, DcOffset to the value which is the mean of the current Window.
Variables set with SETVARIABLE are global to the session. Use VARS to view variables in the worksheet.
SETVARIABLE can be abbreviated SETVAR.
Variables can also be assigned with the = operator:
DcOffset = mean(curr)
A variable can be declared as global in an SPL function with the GLOBAL or EXTERN keyword.
A variable can be declared as local in an SPL function with the LOCAL keyword.
See SETHOTVARIABLE to create a hot variable.