Returns the value of a local variable.
GETLOCALVARIABLE("name", element)
"name" |
- |
A string. The name of the local variable. |
element |
- |
Optional. An integer, the array index if the variable is a series or array. |
setlocalvariable("A",
{25, 41, 33});
curr * getlocalvariable("A")
multiplies the series in the current window (curr) by the local variable A.
SETLOCALVARIABLE and GETLOCALVARIABLE are very useful for creating and referencing an arbitrary number of generic local variables in an SPL function.
GETLOCALVARIABLE and SETLOCALVARIABLE can be abbreviated GETLOCAL and SETLOCAL