Peeks at a value, increments the value by 1 then pokes the value back into the buffer.
BinaryIncr( handle, offset ) Increments an 8 bit value.
BinaryIncr2( handle, offset ) Increments a 16 bit value.
BinaryIncr4( handle, offset ) Increments a 32 bit value.
BinaryIncrFlt( handle, offset ) Increments a 64 bit floating point number.
(i) handle: handle of buffer.
(i) offset: zero-based offset in the buffer to obtain byte from.
(i) new byte value.
BinaryIncr is equivalent to doing a BinaryPeek[...], incrementing the extracted value by 1, and then doing a BinaryPoke[...] to store the new value.
Binbuf=BinaryAlloc(10) BinaryPoke( binbuf, 5, -14 ) ;Pokes a new value into the buffer. a=BinaryPeek( binbuf, 5 ) ;Finds the value of a byte. Message("Hmmm", "Returned value is %a%" ) ; Value will be 242 which is (256 - 14). 242 and -14 map ; to the same 8bit number.
Binary Operations, BinaryCopy, BinaryPeek, BinaryPeekStr, BinaryPoke, BinaryPokeStr