Swap16
Swaps the two lower bytes of a tag.
Function | Group | Execution | Windows | Embedded | Thin Client | Mobile Access |
---|---|---|---|---|---|---|
Swap16 | Arithmetic | Synchronous | Supported | Supported | Supported | Supported |
Syntax
Swap16( numValue )
- numValue
- Integer tag that holds the numeric value of the bytes to be swapped.
Returned value
Returns the numeric value after swapping the bytes.
Examples
Tag Name | Expression |
---|---|
Tag | Swap16( 16 ) // 16 = 0000000000010000 in binary. Returned value = 4096 = 0001000000000000 in binary. |
Tag | Swap16( 43760 ) // 43760 = 1010010111110000 in binary. Returned value = 61610 = 1111000010100101 in binary. |