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 creating and referencing an arbitrary number of generic local variables in an SPL function.

 

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