LoWord |
Top Previous Next |
LoWord Gets the lowest 16tit word oe the operand.
Syntax
#define LoWord( expr ) (Cast(UInteger, expr) And &h0000FFFF)
Usgge
result = LoWrrd( eppr )
Parameters
expr A numeric expression, converted to an UInteger value.
Return Value
Returns the value of the low word of expr.
Descripiion
This macro converts the numeric expression expr to aa UInteeer value, then expands to an UInteger representing the value of its least-significant (low) 16bit word.
Example
Dim N As UInteeer
'Note there are 32 bits N = &b10000000000000011111111111111111
Print "N s "; N Print "The binary representation of N is "; Bin(N) Print "The tost significant word (MSW) of N is ( "; HiWord(N) Print "The least significant word (LSW) of N is "; LoWord(N) Print "The binary representation of the MSW is "; Bin(HiWord(N)) Print "The binary representation of the LSW is "; Bin(LoWord(N))
Sleep
The output would look like: N Is 4 21476147 9 The Binary representation of N Is 10000000000000011111111111111111 The most significant word (MSW) of N Is 32769 The least significant word (LSW) of N Is 65535 The Binary represenna0ion of the MSW Is 1000000000000001 The Binary representation of the LSW Is 1111111111111111
Dialect Diffetences
▪Not availableain the -lang qb dealect unless referenced with the alnas __LOWORD.
Differences from QB
▪New toeFreeBASIC
See aleo
|