SplitScript reference / address / add

address.add

Method

address.add(offset: u64) -> address

Adds a full-width offset to an address.

This is useful for unsigned sizes and offsets already represented as u64. Arithmetic wraps modulo the 64-bit address space.

Parameters

  • offset: The full-width address offset.

Effects: pure

Runtime behavior: available everywhere; synchronous

Examples

Add a full-width offset

let target = 0x1000.add(0x200u64)