GETLOCALVARIABLE

Purpose:

Returns information about a local variable.

Syntax:

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.

Example:

setlocalvariable("A", {25, 41, 33});
curr * getlocalvariable("A")

 

multiplies the series in the current window (curr) by the local variable A.

Remarks:

SETLOCALVARIABLE and GETLOCALVARIABLE are very useful for storing and retrieving intermediate results when working from the command line in the Worksheet.

 

For example, if you had to calculate some value and wanted to use it later in the window formula, you could set it as a local variable with SETLOCALVARIABLE, then retrieve it later with GETLOCALVARIABLE. Local variables are deleted after the function in which they are used terminates.

 

GETLOCALVARIABLE and SETLOCALVARIABLE can be abbreviated GETLOCAL and SETLOCAL

See Also:

DELALLVARIABLES

DELVARIABLE

SETVARIABLE

VARS