Click or drag to resize

SwapInt Function

X#
Exchange the right and left halves of an integer.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 FUNCTION SwapInt(
	liSwap AS LONG
) AS LONG
Request Example View Source

Parameters

liSwap
Type: Long
The integer whose bytes you want to swap.

Return Value

Type: Long
The swapped integer.
Remarks
SwapInt() swaps the right half of an integer with the left half of an integer and returns the result.
The sign may not be preserved during the swap.
Examples
This example uses SwapInt():
X#
1? SwapInt(30001)        // 1966145536
See Also