DataType (FPScript)

21.09.2021

Determines the data type of a data set.

Syntax

DataType(DataSet)

 

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

Part

Description

DataSet

The data set for which the data type is determined.

All data structures are allowed. All data types and also object references are permitted.

Remarks

The result is an integer that represents the data type. You can determine the data type of individual components for signals, space curves and signal series.

The function returns one of the following values:

Constant

Meaning

TYPE_EMPTY

Data type code for Empty.

TYPE_BOOLEAN

Data type code for a Boolean value.

TYPE_INTEGER16

Data type code for a 16-bit integer.

TYPE_INTEGER32

Data type code for a 32-bit integer.

TYPE_INTEGER64

Data type code for a 64-bit integer.

TYPE_FLOATINGPOINT32

Data type code for a 32-bit floating point value.

TYPE_FLOATINGPOINT64

Data type code for a 64-bit floating point value.

TYPE_COMPLEXINTEGER16

Data type code for a complex 16-bit integer.

TYPE_COMPLEXINTEGER32

Data type code for a complex 32-bit integer.

TYPE_COMPLEXINTEGER64

Data type code for a complex 64-bit integer.

TYPE_COMPLEXFLOATINGPOINT32

Data type code for a complex 32-bit floating point value.

TYPE_COMPLEXFLOATINGPOINT64

Data type code for a complex 64-bit floating point value.

TYPE_STRING

Data type code for a string.

TYPE_CALENDARTIME

Data type code for calendar time.

TYPE_TIMESPAN

Data type code for time span.

TYPE_AGGREGATE

Data type code for a signal, signal series and space curve.

TYPE_VARIANT

Data type code for a list with potential varying data types.

TYPE_OBJECTREF

Data type code for an object reference.

Available in

FlexPro View, Basic, Professional, Developer Suite

Examples

DataType(0)

Results in TYPE_INTEGER32.

DataType({1.0, 2})

Results in TYPE_FLOATINGPOINT64.

DataType((1.s, 2.s))

Results in TYPE_COMPLEXFLOATINGPOINT32.

DataType(Signal.y)

Checks the data type of a signal's Y component.

Dim s = Signal As Object
DataType(s)
DataType(Value s)
 

If Signal is a data set with the signal data structure, then the first DataType call results in the TYPE_OBJECTREF value and the second results in TYPE_AGGREGATE.

See Also

DataStructure Function

Data Types

Share article or send as email:

You might be interested in these articles