Returning the data type of a fieldΒΆ

datatype()

Return the data type of a field


SYNTAX

datatype(object_id)

This function returns the arithmetic data type of the field specified by object_id. The possible return values are defined in the standard include file $SCULPTOR/include/sculptor.h. See Arithmetic data types for a list of these values.

This function returns an integer value.

The data type of a field can also be retrieved by means of the run time datatype field property. This property can also be used to change certain field types at run time.


EXAMPLE

!function GetVal(Value) {

     switch datatype(Value) {
          case = DT_INTEGER:
               info "Integer value supplied"
               break

          case = DT_REAL:
               info "Floating point value supplied"
               break
          ...
     }