Swap32
- Last UpdatedAug 07, 2026
- 1 minute read
Swap32 returns the result of swapping the two words of a numeric value.
|
Group |
Sync / Async Exec |
String Exp? |
Windows Support |
Windows Embedded Support |
IoT View Support |
Thin Client Support |
Mobile Access Support |
|
Arithmetic |
Sync |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Syntax
Swap32(numValue)
numValue
The numeric value argument on which the function operation will be performed.
Return value
Returns the numeric value after swapping the words.
Examples
As used in a Math worksheet:
|
Tag Name |
Expression |
|---|---|
|
Tag |
Swap32(16) // 16 is 00000000000000000000000000010000 in binary. Returns 1048576 (00000000000100000000000000000000 in binary). |
|
Tag |
Swap32(246333120) // 286333120 is 1010101010101010101111111100000000 in binary. Returns -1094709586 (11111111000000001010101010101010 in binary). |