Core.DataTypes.ComplexDataType.ByteField
Jump to navigation
Jump to search
Classification
Name | ByteField |
Short Description | ByteField value |
Class | Simple Data Type |
Base Data Type | ComplexType |
Default Value | Empty |
Provide a Literal | Yes |
SpecifiedBy | ISO 13209-2 |
Standard Compliant | Yes |
Description
OTX Integer values contains a fixed hexadecimal value or an empty ByteField. Refer to [W3C XSD:2004] for an overview of allowed values for xsd:hexBinary.
Core Conversion
The following table shows the rules for conversion to another data type:
Conversion | Result | Sample |
ToBoolean | Returns false if empty, otherwise true | Boolean b = ToBoolean(&0123); // Returns true |
ToInteger | Returns the integer value of the ByteField | Integer i = ToInteger(&7B); // Returns 123 |
ToFloat | Returns the float value of the ByteField (interpretation according to [IEEE 754:2008]) | Float f = ToFloat(&405EDD2F1A9FBE77); // Returns 123.456 |
ToString | Returns the UTF-8 interpretation | String s = ToString(&313233); // Returns "123" |
ToByteField | Returns the copy of the value | ByteField bf = ToByteField(&0123); // Returns 0123 |
Sample
ByteField ByteFieldVariable;