Integer

64-bit signed integer type with arithmetic and comparison operations.

xxml
Language::Core

Methods

MethodParametersReturnsDescription
ConstructorInteger^Create integer with value 0
Constructorvalue: int64Integer^Create from literal
addother: Integer^Integer^Addition
subtractother: Integer^Integer^Subtraction
multiplyother: Integer^Integer^Multiplication
divideother: Integer^Integer^Integer division
moduloother: Integer^Integer^Remainder
negateInteger^Negation (-n)
absInteger^Absolute value
equalsother: Integer^Bool^Equality check
lessThanother: Integer^Bool^Less than
greaterThanother: Integer^Bool^Greater than
lessThanOrEqualother: Integer^Bool^Less or equal
greaterThanOrEqualother: Integer^Bool^Greater or equal
toStringString^Convert to string
toFloatFloat^Convert to Float
toDoubleDouble^Convert to Double
toInt64int64Get raw value

Examples

Basic Integer Operations

xxml
Instantiate Integer^ As <a> = Integer::Constructor(10);
Instantiate Integer^ As <b> = Integer::Constructor(3);

Instantiate Integer^ As <sum> = a.add(b);        // 13
Instantiate Integer^ As <diff> = a.subtract(b);  // 7
Instantiate Integer^ As <prod> = a.multiply(b);  // 30
Instantiate Integer^ As <quot> = a.divide(b);    // 3
Instantiate Integer^ As <rem> = a.modulo(b);     // 1

See Also