I had a bug in some code and finally tracked it down to this bit of code,
**broken link removed**
Can anyone explain how 4*60*6 = -96?
This is one of the reasons I really distrust C18.
Edit, Actually, I just worked it out. It's done the calculation as bytes to get 160 (1440-5*256) and then cast this to a signed byte before casting to my signed long. Someone should be shot for that. I knew there was a reason I stopped using C18.
Mike.
**broken link removed**
Can anyone explain how 4*60*6 = -96?
This is one of the reasons I really distrust C18.
Edit, Actually, I just worked it out. It's done the calculation as bytes to get 160 (1440-5*256) and then cast this to a signed byte before casting to my signed long. Someone should be shot for that. I knew there was a reason I stopped using C18.
Mike.
Last edited: