OTX Reference  
OpenTestSystem.Otx.Core.DataTypes.Integer Class Reference

Integer numbers. More...

Inheritance diagram for OpenTestSystem.Otx.Core.DataTypes.Integer:
Inheritance graph

Public Attributes

IntegerLiteral init
 Initialisation of a Integer declaration with a literal More...
 

Detailed Description

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.

Note
If an Integer declaration is not explicitly initialized, 0 is assigned to the declaration.
Terms and Actions
List of some useful terms and actions:.
Conversion Terms
ConversionResultSample
ToBooleanReturns false if 0, otherwise true
Boolean b = ToBoolean(123); // Returns true
ToIntegerReturns the copy of the value
Integer i = ToInteger(123); // Returns 123
ToFloatReturns a float copy of the integer value
Float f = ToFloat(123); // Returns 123.0
ToStringReturns the value in decimal string representation
String s = ToString(123); // Returns "123"
ToByteFieldReturns 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
Syntax Declaration
Integer Declaration [= IntegerLiteral];
Literal
0
1234
Sample
Integer IntegerVariable = 12345;

Member Data Documentation

◆ init

IntegerLiteral OpenTestSystem.Otx.Core.DataTypes.Integer.init

Initialisation of a Integer declaration with a literal