SETLOCALVARIABLE

Purpose:

Sets a local variable.

Syntax:

SETLOCALVARIABLE("name", value)

"name"

-

A string. The name of the local variable.

value

-

A string, scalar, series or table, the value to assign.

Example:

setlocalvariable("Gain", Min(Curr))

 

sets the local variable, Gain, to the minimum value of the current Window.

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.

 

SETLOCALVARIABLE can be abbreviated SETLOCALVAR.

 

A variable can be defined as local in an SPL function with the LOCAL keyword.

See Also:

=

DELALLVARIABLES

DELVARIABLE

EXTERN

GETLOCALVARIABLE

GETVARIABLE

GLOBAL

LOCAL

SETHOTVARIABLE

SETVARIABLE

SPLREAD

VARS