Click or drag to resize

SwapLong Function

Exchange the right and left halves of a long integer.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.2a
Syntax
 FUNCTION SwapLong(
	liSwap AS LONG
) AS LONG
View Source

Parameters

liSwap
Type: Int32
The long integer whose words you want to swap.

Return Value

Type: Int32
The swapped long integer.
Remarks
SwapLong() swaps the right half of a long integer with the left half of a long integer and returns the result.  The sign may not be preserved after the swap.
Examples
This example uses SwapLong():
X#
? SwapLong(256000000)                // 1073745730
See Also