DADiSP Worksheet Functions > Function Categories > Query Functions > GETWNUM
Returns the Window number of a Window.
GETWNUM(win)
win |
- |
Optional. Window reference. Defaults to the current Window. |
An integer, the Window number of the Window.
getwnum(w3)
returns 3.
If Window 2 is the current Window:
getwnum - 1
returns 1.
eval(sprintf("deriv(W%d)", getwnum-1))
performs a derivative of Window 1.
wref = refwindow(w3);
n = getwnum(wref);
n == 3
GETWNUM is useful in SPL routines and command files where the current Window number may not be obvious.
See GETWINNAME to return a string that contains the symbolic or numeric name of the Window.