Skip to content
Member Filters
Show Inherited
Show Protected
Show abstract
GR32_LowLevel🞂Swap16Function

Swap16

Converts endianness by swapping byte order of 16-bit, 32-bit, or 64-bit integer values.

Declarations ​

pascal
function Swap16(Value: Word): Word;
function Swap32(Value: Cardinal): Cardinal; overload;
function Swap64(Value: Int64): Int64;
Overload Details

Overload 1 ​

pascal
function Swap16(Value: Word): Word;

Swaps byte order of a 16-bit Word value.

ParameterTypeDescription
ValueWordInput 16-bit word.
TypeDescription
Word16-bit word with swapped byte order.

Overload 2 ​

pascal
function Swap32(Value: Cardinal): Cardinal; overload;

Swaps byte order of a 32-bit Cardinal value.

ParameterTypeDescription
ValueCardinalInput 32-bit cardinal.
TypeDescription
Cardinal32-bit cardinal with swapped byte order.

Overload 3 ​

pascal
function Swap64(Value: Int64): Int64;

Swaps byte order of a 64-bit Int64 value.

ParameterTypeDescription
ValueInt64Input 64-bit integer.
TypeDescription
Int6464-bit integer with swapped byte order.

Description ​

Swap16, Swap32, and Swap64 convert values between little-endian and big-endian representations by reversing their byte order.

See also ​