int

Ints represents a 32-bit signed data type.

Operators

self + int : int

Performs a "No Signed Wrap (NSW)" addition of two integers. Example:

int a := 1 + 2; // 3

self - int : int

Subtracts the given integer from some other integer.

Example:

int a := 5 - 3; // 2 

self < int : boolean

Determines if the given integer is less than some other integer.

Example:

boolean a := 1 < 2; // true
boolean b := 2 < 2; // false 
boolean c := 3 < 2; // false 

self <= int : boolean

Determines if the given integer is less than or equal to some other integer.

Example:

boolean a := 1 <= 2; // true 
boolean b := 2 <= 2; // true 
boolean c := 3 <= 3; // false

self > int : boolean

Determiens if the given integer is greater than some other integer.

Example:

boolean a := 1 > 2; // false 
boolean b := 2 > 2; // false 
boolean c := 3 > 2; // true

self >= int : boolean

Determines if the given integer is greater than or equal to some other specified integer.

Example:

boolean a := 1 >= 2; // false 
boolean b := 2 >= 2; // true 
boolean c := 3 >= 2; // true

self == int : boolean

Determines if the given integer is equal to some other specified integer.

Example:

boolean a := 1 == 2; // false
boolean b := 2 == 2; // true
boolean c := 3 == 2; // false 

self != int : boolean

Determiens if the given integer is not equal to some other specified integer.

Example:

boolean a := 1 != 2; // true 
boolean b := 2 != 2; // false 
boolean c := 3 != 2; // true 

self * int : int

Multiplies the given integer with some specified integer.

Example:

int a := 3 * 2; // 6 

self / int : int

Divides the given integer by some other integer.

Example:

int a := 20 / 5; // 4 

self % int : int

Modulus of the given integer by some other specified integer.

Example:

int a := 21 % 20; // 1

Specifications

  • Size: 32-bits
  • Default Value: 0
  • Default Location: Stack
  • Default Modifiers: Non-linear