NumberOfColumns (FPScript)

21.09.2021

Determines the number of columns in a data set.

Syntax

NumberOfColumns(DataSet)

 

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

Part

Description

DataSet

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

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

Remarks

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

The function always returns 1 for a scalar value, data series, signal, space curve or list. For a data matrix or a signal series, the function 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.

If the argument is a list, then the function is executed for each element of the list and the result is also a list.

Available in

FlexPro View, Basic, Professional, Developer Suite

Examples

NumberOfColumns({1, 3, 4})

Results in 1L.

NumberOfColumns({1, 3, 4} # 2)

Results in 2L.

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

Results in [1L, 2L].

See Also

NumberOfElements Function

NumberOfRows Function

Rank Function

Shape Function

Share article or send as email:

You might be interested in these articles