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
| Member | Description | Available through |
|---|---|---|
| Display | Supports conversion to a user-facing textual representation. | |
| Numeric | Supports ordered numeric operations. |
Implemented by
| Member | Description | Available through |
|---|---|---|
| address | Stores a process address. | |
| i16 | Stores a 16-bit signed integer. | |
| i32 | Stores a 32-bit signed integer. | |
| i64 | Stores a 64-bit signed integer. | |
| i8 | Stores an 8-bit signed integer. | |
| u16 | Stores a 16-bit unsigned integer. | |
| u32 | Stores a 32-bit unsigned integer. | |
| u64 | Stores a 64-bit unsigned integer. | |
| u8 | Stores an 8-bit unsigned integer. |
Operators
| Member | Description | Available 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
| Member | Description | Available through |
|---|---|---|
| toString | Formats this integer using a positional numeral system. |