Returning the user data type of a fieldΒΆ

usertype()

Return the user data type of a field


SYNTAX

usertype(field_id)

This function returns the user type number of the field specified by field_id. This function is only relevant to fields with a user defined type. The datatype() function may be used to determine whether a field is of this type. It returns the value DT_UDEF for a user defined data type.

If field_id is not a user defined type then usertype() returns 0.

This function returns an integer value.


EXAMPLE

!temp Field,,t6
!temp UTNo,,u1

     tmp.UTNo = usertype(tmp.Field) /* Sets tmp.UTNo to 6 */

RELATED TOPICS

Arithmetic data types