SETVARIABLE

Purpose:

Sets a global variable.

Syntax:

SETVARIABLE("name", value)

"name"

-

A string. The name of the global variable.

value

-

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

Example:

setvariable("DcOffset", mean(curr))

 

sets the variable, DcOffset to the value which is the mean of the current Window.

Remarks:

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.

See Also:

=

CLEAR

DEFMACRO

DEFVAR

DELALLVARIABLES

DELVARIABLE

EXTERN

GETVARIABLE

GLOBAL

LOCAL

SETLOCALVARIABLE

SETHOTVARIABLE

SPLREAD

VARS