Search the Community
Showing results for tags 'union'.
-
Hello! I am trying to get hold of the bits in a word, i have read that union is the way to go. My problem is that i cant figure out how union works. I have made a union between a word (16bit) and an array(0...15). The way I understood this was that the word now automaticly updates the array so that when the least significant bit in the word should update array[00] and so on. This is not happening. When I monitor the variables I can see the word change, but nothing happens with the array. Have I misunderstood the consept and what should I do to get hold of the bits?
- 4 replies
-
- word members
- union
-
(and 2 more)
Tagged with:
-
I am having problem converting a DWORD variable to a floating point decimal. I've tried using the DWORD_TO_REAL function. Having the hex value "41E9B814" as an input I was expecting to get "29.2148819" as an output. However, I'm getting "1.110194.." as the output. Any ideas?
- 2 replies
-
- conversion
- dword
-
(and 1 more)
Tagged with: