Core.DataTypes.SimpleDataType.Integer

From emotive
Jump to navigation Jump to search

Classification

Name Integer
Short Description 64 signed bit integer
Class Simple Data Type
Base Data Type SimpleType
Default Value 0
Provide a Literal Yes
SpecifiedBy ISO 13209-2
Standard Compliant Yes

Description

OTX Integer data type identifies OTX in a 64-bit signed integer, range of values is long[-9223372036854775808 (-2^63) to 9223372036854775807 (2^63 - 1)].

Core Conversion

The following table shows the rules for conversion to another data type:

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

Sample

Integer IntegerVariable;