8.1 TData_Type

The TData_Type class is used to pass data type information.


The TData_Type class has the following methods:


integer Family


Indicates the family of the data type. The following families are defined:
Value Mnuemonic Description
0 DataType_Family_Undefined Undefined or unknown (untyped).
1 DataType_Family_Logical Logical (boolean).
2 DataType_Family_String Text.
3 DataType_Family_Numeric Numeric.
4 DataType_Family_Procedure Code (procedure/function/method).


int Data_Type


Indicates the data type. The lowest 3 bits are the family (one of the above datatype families), and the rest of the bits indicate which type within that family. CEF understands the following data types:
Value Mnuemonic Description
1 DataType_Boolean Boolean value (0=false, anything else=true)
2 DataType_String String value.
3 DataType_Integer Integer (whole) number.
11 DataType_Real Floating-point number.
19 DataType_BCD Binary-coded decimal number.


int Size

Total current size in bits. Note that this may be smaller than the maximum size.


boolean Big_Endian

True if value is stored in big-endian form.


int Max_Size

Maximum size in bits. For fixed-length data, this is the same as the current size.



The following methods apply to numeric types:


TTri_State Signed


True if signed, False if unsigned, Dont_Care if either/neither.
TTri-State is an enumeration, as follows:

Value Mneumonic Description
0 TS_False False. Not signed.
1 TS_True True. Signed.
2 TS_Dont_Care Either signed or unsigned, unknown, or don't care.


integer Mantissa


Number of bits in mantissa (including sign, if signed).


integer Exponent


Number of bits in exponent (DataType_Real only).


boolean Fixed


True if fixed point number (DataType_Real and Data_Type_BCD only) or fixed-length string.


integer Fixed_Position


If fixed, this is the position of the decimal place (eg 3 means the 3rd digit is the first digit of the fractional part).


boolean Pack


True if packed (DataType_BCD only).



The following methods apply to string types:


integer Length_Encoding


Indicates the way that string length is encoded in the data:

Value Mneumonic Description
0 Datatype_String_Length_Other Fixed or otherwise unknown length encoding.
1 Datatype_String_Length_Terminated String is terminated by a null (ASCII 0).
2 Datatype_String_Length_Prefix String is prefixed with length.


integer Prefix_Size


Number of bits of length for strings with length prefix.


integer Encoding


The character encoding scheme used for this string:

Value Mneumonic Description
0 Datatype_String_Encoding_Unknown Undefined or unknown encoding.
1 Datatype_String_Encoding_ASCII 7-bit ASCII (8th-bit ignored).
2 Datatype_String_Encoding_EBCDIC EBCDIC.
3 Datatype_String_Encoding_Radix50 Radix-50.
4 Datatype_String_Encoding_UTF8 8-bit (multi-bit) UNICODE (utf8)
5 Datatype_String_Encoding_Unicode16 16-bit UNICODE.
6 Datatype_String_Encoding_Unicode32 32-bit UNICODE.