GetByte

(Engine-Level Function)

Description: Returns a single byte from a buffer.
Returns: Byte
Usage: Script or steady state.
Function Groups: String and Buffer
Related to: SetByte
Format: GetByte(Buffer, Offset)
Parameters:  
Buffer
Required. Any buffer expression giving the buffer to get the byte from.
Offset
Required. Any numeric expression giving the offset from the start of the buffer in bytes, starting from 0.
Comments: This function is useful for manipulating text on a byte-by-byte level. For example, examining serial I/O driver response packets.

Example:

  oneByte = GetByte(response, 0);

The variable oneByte is set to the character value of the first byte in the text variable response.

If response is Invalid, then oneByte will be Invalid. If oneByte is valid, its value will always be in the range 0 to 255.