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.
| Parameter | Type | Description |
|---|---|---|
Value | Word | Input 16-bit word. |
| Type | Description |
|---|---|
Word | 16-bit word with swapped byte order. |
Overload 2 ​
pascal
function Swap32(Value: Cardinal): Cardinal; overload;Swaps byte order of a 32-bit Cardinal value.
| Parameter | Type | Description |
|---|---|---|
Value | Cardinal | Input 32-bit cardinal. |
| Type | Description |
|---|---|
Cardinal | 32-bit cardinal with swapped byte order. |
Overload 3 ​
pascal
function Swap64(Value: Int64): Int64;Swaps byte order of a 64-bit Int64 value.
| Parameter | Type | Description |
|---|---|---|
Value | Int64 | Input 64-bit integer. |
| Type | Description |
|---|---|
Int64 | 64-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.