WINSTATUS

Purpose:

Returns status of current Window.

Syntax:

WINSTATUS(win, attrib)

win

-

Optional. Window reference. Defaults to the current Window.

attrib

-

Optional. Integer value indicating the window attribute to query:

0:

Window number (default)

1:

Active status

2:

Zoomed status

3:

Hidden status

4:

Contains series

Returns:

For attribute 0, WINSTATUS returns the current window number.

 

For attributes 1-4, WINSTATUS returns 0 or 1.

Example:

In a four window worksheet with window 2 current and zoomed

 

winstatus(2)

 

returns a 1 indicating the current window, W2, is zoomed.

 

Example:

W1: gnorm(10, 1)

W2: {}

 

winstatus(w1, 4) == 1

winstatus(w1, 4) == 1

 

clear w1

 

winstatus(w1, 4) == 0

Remarks:

WINSTATUS returns a real number.

 

WINSTATUS is useful when writing code that interacts with a worksheet particularly when there is no prior knowledge of the status of the worksheet.

See Also:

GETWNUM

ISWINEMPTY

STRWIN

ZOOM