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]
``````

• bigendianbinaryvalue( -- converts big endian binary data (a byte, word, or longword) into an unsigned number (see Binary Data).
• Binary Data -- Panorama allows a formula or procedure to work with raw binary data.
• binarydatabuild( -- builds a binary value by scanning a database and assembling individual binary values for every record (including invisible records) in the database.
• binarytotext( -- converts binary data into text, optionally using a specified encoding.
• binaryvalue( -- converts binary data (a byte, word, or longword) into a number (see Binary Data).
• byte( -- converts a number into a single byte of binary data (see Binary Data).
• bytearray( -- extracts a value from an array of bytes (see [Binary Data]).
• bytepattern( -- converts a byte count to text: 543 Bytes, 543 Kb, 123 Mb, 3.2 Gb
• Data Arrays -- A numbered collection of data values.
• Data Dictionaries -- Overview of Panorama's key/value data dictionaries.
• hex( -- converts a text item containing a hexadecimal number into a standard number (decimal).
• hexbyte( -- converts a limited range of decimal numbers to a two-digit hexadecimal number expressed as a text string.
• hexlong( -- converts a decimal number to an eight-digit hexadecimal number expressed as a text string
• hexstr( -- converts a number to text formatted as a hexadecimal number.
• hextobinary( -- converts a sequence of hexadecimal digits into a raw binary data value.
• hexword( -- converts a decimal number to a four-digit hexadecimal number expressed as a text string.
• littleendianbinaryvalue( -- converts little endian binary data (a byte, word, or longword) into an unsigned number (see Binary Data).
• longlongword( -- converts a number into a 64 bit longword (8 bytes) of binary data (see Binary Data).
• longlongwordarray( -- extracts a value from an array of 64 bit longlongwords (see [Binary Data]).
• longword( -- converts a number into a 32 bit longword (4 bytes) of binary data (see Binary Data).
• longwordarray( -- extracts a value from an array of 32 bit longwords (see [Binary Data]).
• radix( -- converts a text item containing a number in a radix between 2 and 36 into a decimal number.
• radixstr( -- converts a number into a text item containing the equivalent number in a radix between 2 and 36.
• signedbinaryvalue( -- converts binary data (a byte, word, or longword) into a signed number (see Binary Data).
• texttobinary( -- converts text into binary data, optionally using a specified encoding.
• word( -- converts a number into a single word (2 bytes) of binary data (see Binary Data).
• wordarray( -- extracts a value from an array of 16 bit words (see Binary Data).

History

 Version Status Notes 10.0 No Change Carried over from Panorama 6.0.