SETWFORM

Purpose:

Sets the formula for a Window.

Syntax:

SETWFORM(win, "formula")

win

-

Optional. Window reference. Defaults to current Window.

"formula"

-

A string, any valid formula. A formula can be any command, function, or macro. The following are examples of valid formula types:

1.

An expression evaluating to a series or scalar, e.g. "W1*W1"

2.

Commands that return nothing but manipulate a series or Window display, e.g. "EXPANDH(2)", "FPEAK", "CURSORON", or "PLOTMODE(0)".

3.

user-defined functions or macros, e.g. AUTOCOR

Example:

setwform("reverse(W1)")

 

calculates the expression reverse(W1) in the current Window and stores the formula in the current Window.

 

setwform(W2, "reverse(W1)")

 

explicitly sets the formula for W2.

 

SETWFORM is useful in SPL routines and custom menus executed by the MENUFILE function.

Remarks:

The := operator can also set a window formula. For example:

W2 := reverse(w1)

 

Is equivalent to : setwform(W2, "reverse(W1)")

See Also:

:= (Hot Variable Assignment)

: (Window Assignment)

ADDWFORM

GETWFORMULA

MENUFILE