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 support@ccsinfo.com

Error with "%" operator and int32 or int64

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



Joined: 30 Oct 2007
Posts: 2

View user's profile Send private message

Error with "%" operator and int32 or int64
PostPosted: Tue Oct 30, 2007 4:04 am     Reply with quote

With this program and PCD compiler v4.059, the result is fault with "%" operator...
int32 a;
int32 b;

void main(void)
{

a= 0;
b=a%100;

// here b=100 error instead of 0

}
same problem with int64

Has any body the same problem ?
Do you have a solution ?

Thanks
MB
Ken Johnson



Joined: 23 Mar 2006
Posts: 197
Location: Lewisburg, WV

View user's profile Send private message

PostPosted: Tue Oct 30, 2007 6:57 am     Reply with quote

When I find a definite bug like this appears to be, I build a simple project showing the bug, and submit it to ccs (support@ccsinfo.com). Given a clear simple example, they'll usually fix it (relatively) promptly.

Ken
Ttelmah
Guest







PostPosted: Tue Oct 30, 2007 9:57 am     Reply with quote

I'd report this, and switch back to an older compiler. Repeat this mantra after me: "The latest CCS compiler is only a beta"....
This is a 'famed' line from the 'old hands' here, because it is so tyical of CCS that they fix one thing, or add a new feature to the compiler, and in doing so, make half a dozen thing not work. Their idea of 'testing', seems to be to distribute the code, and see how many people complain... :(

Best Wishes
Ttelmah
Guest







PostPosted: Tue Oct 30, 2007 4:00 pm     Reply with quote

I have just tried this with 4.059, and it happily gives 0, as it should....
As a comment, int64, doesn't yet exist. Mention of it, has been added to the 'help', but it is still not listed as a type, and is not supported.

Best Wishes
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