hi
after this code timeVar=245
I got this message on SIOW TERMINAL
like" *** timePot=255 timeVar=245 *** "
but I have to get timeVar=(255*11)=2805 why? I do not understand..
ok thanks for other form like...
(int8 var1)=(int16 var2) / (int8 var3) is necessary or not..
newguy
Joined: 24 Jun 2004 Posts: 1907
Posted: Sun Sep 03, 2006 1:53 pm
You have to be careful with CCS and casting - it can be tricky. I've found that mixing int16's and int8's in formulae is a usually a bad idea.
Whenever I have some calcs that mix 8 & 16 bit values, I always write a test program to see if I get the results I expect to see. If not, casting is always the culprit [rather, how CCS handles casting is different from my idea how it should be handled].
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum