The arraysize( function returns the number of elements in a text array or a data array (see Text Arrays and Data Arrays).
Parameters
This function has two parameters:text – The array whose elements you want to count.
separator – The separator character for this array. This parameter is omitted if the target array is a data array.
Description
This function returns the number of elements in the specified array. If a text array is empty, the function will return a result of “1” (it interprets the array as having one empty element). If a data array is empty, the function returns a result of zero.
arraysize("Red,Green,Blue",",") ☞ 3
arraysize("Red",",") ☞ 1
arraysize("",",") ☞ 1
arraysize(",,",",") ☞ 3
arraysize("sun/mon/tue/wed/thu/fri/sat","/") ☞ 7
This function works with both data and text arrays. Because Data Arrays have no separators between elements, the separator parameter is omitted when targeting a data array.
The arraysize( function works much as it does for text arrays except that the size of an empty data array is reported as zero.
arraysize(dataarray(2,0.7,18,5.12,360)) ☞ 5
arraysize(dataarray()) ☞ 0
See Also
History
Version | Status | Notes |
10.0 | No Change | Carried over from Panorama 6.0 |