Click or drag to resize

SwapDWord Function

X#
Exchange the right and left halves of a double word.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax
 FUNCTION SwapDWord(
	dwSwap AS DWORD
) AS DWORD
Request Example View Source

Parameters

dwSwap
Type: DWord
The double word value whose words you want to swap.

Return Value

Type: DWord
The swapped double word.
Remarks
SwapDWord() swaps the right half of a double word with the left half of a double word and returns the result.
The sign may not be preserved during the swap.
Examples
This example uses SwapDWord():
X#
1bHex := 0x23CACE
2? SwapDWord(bHex)        // returns 3402498083
See Also