SwapWord
Syntax
word swapWord(word x); // form 1
int swapInt(int x); // form 2
dword swapDWord(dword x); // form 3
long swapLong(long x); // form 4
int64 swapInt64(int64 x); // form 5
qword swapQWord(qword x); // form 6
Function
Swaps bytes of parameters. CAPL arithmetics follows the "little-endian-format" (Intel). The swap-functions serve for swapping bytes for the transition to and from the "big-endian-format" (Motorola).
Parameters
Value whose bytes are to be swapped.
Return Values
Value with swapped bytes.
bigEndian = swapInt(1234); // create constant 1234 for Motorola processors