DADiSP Worksheet Functions > Function Categories > Query Functions > ITEMCOUNT
Returns the number of columns in an item.
ITEMCOUNT(win, item)
win |
- |
Optional. Window reference. Defaults to the current Window. |
item |
- |
Optional. A positive integer, the index to the item in the Window. Defaults to 1. |
An integer, the number of series (columns) that comprise the referenced item.
W1: gsin(100, .01)
W2: gcos(100, .01)
W3: xy(W1, W2)
itemcount(W3, 1)
returns the value 2. There are two columns in an XY plot.
W4: errorbar(W1+3*stdev(W1), W1+stdev(W1), W1-stdev(W1), W1-3*stdev(W1), 1)
itemcount(W4,1)
returns 4, the number of series that comprise an ERRORBAR series.
An ITEM is a data object comprised of one or more series. For example, an interval series is an item that consists of one series, an XY series is an item that consists of 2 series and an XYZ series is an item that consists of 3 series.
If the specified item number is larger than the number of items in the window, ITEMCOUNT returns 0.