OTX Reference
|
|
Public Attributes | |
IntegerLiteral | init |
Cardinality [0..1] Initialisation of a Integer declaration with a literal More... | |
Integer numbers.
The Integer data type shall correspond to the term "integer" in a purely mathematical sense. Since OTX adheres to the W3C definition of the xsd:long data type, the value space is nonetheless restricted; it ranges from -9223372036854775808 (-2^63) to 9223372036854775807 (2^63-1). This corresponds to 64-bit two's complement memory representation of the integer.
0
is assigned to the declaration. Conversion | Result | Sample |
---|---|---|
ToBoolean | Returns false if 0 , otherwise true | Boolean b = ToBoolean(123); // Returns true
|
ToInteger | Returns the copy of the value | Integer i = ToInteger(123); // Returns 123
|
ToFloat | Returns a float copy of the integer value | Float f = ToFloat(123); // Returns 123.0
|
ToString | Returns the value in decimal string representation | String s = ToString(123); // Returns "123"
|
ToByteField | Returns the smallest possible two's complement representation of the integer (using the smallest possible number of bytes). Concerning byte order in the resulting ByteField, little endian will be used | ByteField bf = ToByteField(123); // Returns 7B
|
IntegerLiteral OpenTestSystem.Otx.Core.DataTypes.Integer.init |
Cardinality [0..1]
Initialisation of a Integer declaration with a literal