bytearray(
DATA
,
INDEX
)

The bytearray( function extracts a value from an array of bytes (see Binary Data).


Parameters

This function has two parameters:

data – binary data containing one or more byte (8-bit) values. See Binary Data for more information on this type of data.

index – position of the desired byte, starting from 1.


Description

This function extracts a value from an array of bytes. This is not a Panorama style delimited array but a C style array of 8 bit values. The result is an integer.

bytearray(byte(3)+byte(5)+byte(9),2) ☞ 5

See Binary Data for more information about this type of data.

Note: This function is equivalent to:

binaryvalue((data)[index;1])

See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but since Panorama can no longer treat text as binary data, this function now requires that the first parameter be a binary data value instead of a text value.