Table of contents
TOC
Collapse the table of content
Expand the table of content

BinaryFormat.ByteOrder

Owen Duncan|Last Updated: 4/19/2018

About

Returns a binary format with the specified byte order.

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

Arguments

ArgumentDescription
binaryFormatThe binary format that will be used to read the value.
byteOrderThe 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  
© 2018 Microsoft