hex.read_nth_hex

dst = *(ptr + index*2w) — read the index-th hex past *ptr.

dst is a hex; ptr is a hex[:w/4]; index is a signed hex[:w/4] (may be negative). ptr, index are preserved.

Signature

def read_nth_hex dst, ptr, index < hex.pointers.nth_ptr { ... }

Defined in hex/pointers/read_pointers.fj — lines 78–81 (view on GitHub).

Complexity

  • Time: w(3@+10.25) + 7@+13      // for w=64

  • Space: w(3@+69)    + 7@+48      // for w=64

See the complexity glossary for what @, w, dw, dbit, n mean.

Requires init

The following must be initialised before this macro is invoked:

  • hex.init and stl.ptr_init (or stl.startup_and_init_all).

Source

Depends on


← Previous: hex.read_byte/3 Next: hex.read_nth_byte