SwapWordOrder
Result = SwapWordOrder(Value)
 
Parameters:

    Value = The value whose word order you want to swap
Returns:

    Result
 

      SwapWordOrder splits an integer value into 2 words, reverses the order of these words and returns the result as an integer value.

For example the binary representation of the decimal value 65538 is
  
  0000000000000001 0000000000000010
  


Now we split this value into 2 words named A and B
  
  (A)0000000000000001 (B)0000000000000010
  

and change the order to B and A
  
  (B)0000000000000010 (A)0000000000000001
  

So the binary equivalent of what SwapWordOrder(65538) returns would be
  
  0000000000000010 0000000000000001
  

which is decimal 131073.


 
Related Info: ARGB | SwapByteOrder | SwapLowBytes :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com