SplitScript reference / Integer

Integer

capability

capability Integer

Identifies integral numeric types.

Integer operations and inference constraints accept only whole-number representations. Every integer is also numeric and displayable.

Examples

Preserve an exact integer width

let inventoryMask: u8 = 1 << 2

Requires

MemberDescriptionAvailable through
DisplaySupports conversion to a user-facing textual representation.
NumericSupports ordered numeric operations.

Implemented by

MemberDescriptionAvailable through
addressStores a process address.
i16Stores a 16-bit signed integer.
i32Stores a 32-bit signed integer.
i64Stores a 64-bit signed integer.
i8Stores an 8-bit signed integer.
u16Stores a 16-bit unsigned integer.
u32Stores a 32-bit unsigned integer.
u64Stores a 64-bit unsigned integer.
u8Stores an 8-bit unsigned integer.

Operators

MemberDescriptionAvailable through
&Combines two integers with a bitwise AND.
!Returns the width-preserving bitwise complement of this integer.
|Combines two integers with a bitwise OR.
^Combines two integers with a bitwise exclusive OR.
%Returns the remainder after integer division.
<<Shifts bits to the left.
>>Shifts bits to the right.

Methods

MemberDescriptionAvailable through
toStringFormats this integer using a positional numeral system.