BinaryFormat.ByteOrder

About

Returns a binary format with the specified byte order.

Syntax

   
BinaryFormat.ByteOrder(binaryFormat as function, byteOrder as number) as function  

Arguments

Argument Description
binaryFormat The binary format that will be used to read the value.
byteOrder The most signficant byte appears first in Big Endian byte order. The least significant byte appears first in Little Endian byte order.

ByteOrder.LittleEndian = 0

ByteOrder.BigEndian = 1

Example

let  
binaryData = #binary({0x01, 0x00}),  
littleEndianFormat = BinaryFormat.ByteOrder(  
BinaryFormat.UnsignedInteger16, ByteOrder.LittleEndian)  
in  
littleEndianFormat(binaryData)   
equals 1