Sorry, about the MIA Blacky, I just had a guy come round to pick up all the old Grey motor gear. Good work though, as usual
Simon
Sorry, about the MIA Blacky, I just had a guy come round to pick up all the old Grey motor gear. Good work though, as usual
Simon
It should have been (sizeof(WORD)*8), because the value is supposed to be the bit size (not the byte size). I changed it to sizeof(WORD) which is only 2 (bytes) and so each value that was being extracted was only 2 bits apart instead of 16 bits apart.
That's assuming sizeof() *always* returns the byte count of a field where a byte is *always* 8 bits - which I am sure is the case on all Intel based Windows systems.
Regards
Paul
Before asking for help, please read this.
Ah, yes of course, now I see clearly... I don't know what previously happened to me... ...Ross's programming joke was still with me...
Yes I agree, sizeof(WORD) and sizeof(INT16) are 2 and not 16...
lol, we both fell into the same hole...
Does that mean if bit widths are being used a lot, then a macro like this may come in handy:
#define bit_sizeof(x) (8*sizeof(x))
Before asking for help, please read this.
Was going to do some AutoVE logging last night saw the thread and canceled the session , maybe tomorrow night .
Great work on a fix .
Old Sig :Always be wary of the Software Engineer who carries a screwdriver.
Last edited by Chevy366; March 7th, 2009 at 02:12 PM.
2005 1500 HD , Custom OS3 SD tune .
2006 Trailblazer
Dinosaurs and Plants gave their lives so that we may drive , long live fossil fuel .
Your signature couldn't be more accurate except to say, beware of the programmer using a power saw - I managed to cut through the power cord last time I used a power saw.
In other news a year or so ago, I managed to end up in A&E requiring stitches after watching the (professional) guys remove tiles with a jack hammer from our bathroom which was being renovated. It looked like so much fun, jack hammer verses porcelain tiles, what could be more fun that that? My wife told me not to touch the equipment, she knows me and power tools don't co-exists happily, but while they were having lunch I snuck in and had a go. Wife refused to take me to A&E, I had to convince the builder to drive me there. Got back, hand all stitched up and they were taking to a marble bath with a sledge hammer. Man I had to have a go of that!!! Well, one lump of marble in the face and one black eye later I called it quits for the day. As I've always said - I'm just a programmer.
Regards
Paul
Before asking for help, please read this.
Yeah , worked in the construction field for a while , and would get calls from ladies asking if I could fix or redo what their husbands had started or finished , I have to say Software Engineers were the worst . JK
I had a wealthy client , say to me one time , "I wish I had your talent with tools" , I looked at him and said funny I wish I had your talent for making millions .
Gil
2005 1500 HD , Custom OS3 SD tune .
2006 Trailblazer
Dinosaurs and Plants gave their lives so that we may drive , long live fossil fuel .