Int

Int is a value type that can store a signed, 32-bit integer. That is, a whole number between -2147483648 and 2147483647.

If you need to store a number with a fractional component, use Float instead.

Overflow

Integer arithmetic does not overflow, but is clamped to between Int.Min and Int.Max.

Literal syntax

An Int literal can be written directly.

property Int bankBalance: 0
property Int count: -12
property Int ulimateAnswer: 42

function format(String formatPattern) → String

Returns the integer formatted as a string using the format pattern.

The format pattern is explained in Float.format().

static Int Int.Min: -2147483648

static Int Int.Max: 2147483647

The minimum and maximum values representable by the Int type.