SetByte

Description:              This statement writes a single byte to a buffer.

Returns:                    Nothing

Usage:                   Script

Format:                      SetByte(Buffer, Offset, Value)

Parameters:             Buffer    { Buffer }  { required }  { no default: }

                                                Any buffer expression giving the buffer to set. This buffer must already exist. It could be created by a function such as MakeBuff, or by assignment of a text constant.

                                    Offset    { numeric }  { required }  { no default: }

                                                Any numeric expression giving the offset from the start of the buffer in bytes, starting from 0.

                                    Value    { numeric }  { required }  { no default: }

                                                Any numeric expression giving the byte value to write at Offset bytes from the beginning of Buffer.

Comments:               This statement may only appear in a script.

Example:

msg = "ABCDEF";

If MatchKeys(2, "g");

[

  SetByte(msg, 1, 65); 

]

The value of msg will be "AACDEF" when the user presses "g" on the keyboard.

See Also:

GetByte