SwapWord Function | |
Exchange the right and left halves of a word.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax FUNCTION SwapWord(
wSwap AS WORD
) AS WORD
public static ushort SwapWord(
ushort wSwap
)
Request Example
View SourceParameters
- wSwap
- Type: Word
The word whose bytes you want to swap.
Return Value
Type:
Word
The swapped word.
Remarks
SwapWord() swaps the right half of a word with the left half of a word and returns the result.
Examples
This example uses SwapWord():
1aHex := 0xAB00
2? SwapWord(aHex)
See Also