SplitScript reference / address / offset

address.offset

Method

address.offset<T>(offset: T) -> address where T: Integer

Applies a signed displacement to an address.

Arithmetic wraps modulo the 64-bit address space. This preserves the full unsigned address domain while allowing negative pointer offsets.

Parameters

  • offset: The integer displacement; signed values retain their sign.

Effects: pure

Runtime behavior: available everywhere; synchronous

Examples

Add a field offset

let healthAddress = 0x1000.offset(0x20)