NumberOfElements (FPScript)

21.09.2021

Determines the number of elements in a data set.

Syntax

NumberOfElements(DataSet [ , LoopList = False ])

 

The syntax of the NumberOfElements function consists of the following parts:

Part

Description

DataSet

The data set for which the number of elements is determined.

All data structures are allowed. All data types are permitted.

LoopList

If DataSet is a list and this argument is set to True, then the function does not return the element count of this list, but a list with the element counts of the individual list elements of DataSet.

Permitted data structures are scalar value. Supported data types are Boolean value.

If this argument is omitted, it will be set to the default value False.

Remarks

As the result the function returns a scalar value of data type 64-bit integer.

For a data series, signal or space curve, the function returns the number of values or points. For a data matrix or a signal series, it returns the number of columns. For a data matrix, this corresponds to the number of data series in the data matrix, and for a signal series, it corresponds to the number of signals in the signal series. For a list, the function returns the number of elements in the list. For a scalar value, the function always returns 1.

Available in

FlexPro View, Basic, Professional, Developer Suite

Examples

NumberOfElements({1, 3, 4})

Results in 3L.

NumberOfElements([1, 3, 4])

Results in 3L.

NumberOfElements([ [{1, 2}, 2], {1, 3, 4} # 4], True)

Results in [2L, 4L].

See Also

NumberOfColumns Function

NumberOfRows Function

Rank Function

Shape Function

Share article or send as email:

You might be interested in these articles