chunkarray(
DATA
,
INDEX
,
CHUNKLENGTH
)

The chunkarray( function extracts a binary “chunk” from binary data (see Binary Data).


Parameters

This function has three 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.

chunklength – the length of each “chunk”, in bytes.


Description

This function extracts a binary chunk from an array of chunks. This is not a Panorama style delimited array but a C style array of binary chunks. The result is a binary value (See Binary Data), which in this example Panorama has automatically converted to text (see the binarytotext( function).

chunkarray(byte(65)+byte(82)+byte(96)+byte(78)+byte(99)+byte(87),2,3) ☞ NcW

Note: This function will actually work with either binary data or text. If the data parameter is text, the result will also be text.

chunkarray("abcdefghiljklmnopqrstuvwxyz",2,4) ☞ efgh

Note: This function is equivalent to:

(thetext)[1+(index-1)*chunklength;chunklength]

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.