CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

sin int 32 subtraction of minus sign data problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
w2drz



Joined: 27 Dec 2006
Posts: 55
Location: Western New York - USA

View user's profile Send private message Visit poster's website

sin int 32 subtraction of minus sign data problem
PostPosted: Sat Nov 24, 2007 1:05 pm     Reply with quote

using CCS 3.249 compler
18F4580 PICC
20 MHz

I can do a work around but it would not be nice!!

so and suggestions would be good

tom

problem found and it is not a compiler problem,

thanks to all

tom


Last edited by w2drz on Sun Nov 25, 2007 6:50 pm; edited 3 times in total
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Nov 24, 2007 2:37 pm     Reply with quote

Look at your post before you submit it. You have little pieces of the
"code" block symbols before and after your code. Delete those.
Also, the first one must say "code". The last one (at the end) must
say "/code". Both must be inside brackets. Edit your post and fix
all those things.
Ttelmah
Guest







PostPosted: Sat Nov 24, 2007 3:30 pm     Reply with quote

Also, post your declaration of SINT32. Since this is not a native type, you are presumably declaring it somewhere, and just occassionally, declarations like this, don't function quite as you expect.

Best Wishes
SET



Joined: 15 Nov 2005
Posts: 161
Location: Glasgow, UK

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Sun Nov 25, 2007 1:44 pm     Reply with quote

Code:
void AdjustZIndexes (IndexData *pIdx, SINT32 diff)
{
   int   i;

   for (i=0; i < 16; ++i) {
      if (pIdx->IArray [i] == 0)
         break;            // no more
      pIdx->IArray [i] += diff;
   }
}


Are you saying that the routine above always *added* 'diff' (even if it was negative)?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group