reserveInt method

int reserveInt()

Reserves 4 bytes for a value that isn't known yet and writes a 0 placeholder there. Returns the offset so the value can be overwritten later without re-recording the tape.

Implementation

int reserveInt() {
  int reservedOffset = offset;
  putInt(0);
  return reservedOffset;
}