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

Problem with 4X20 LCD display and dsPIC33EV256GM106
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
cbarberis



Joined: 01 Oct 2003
Posts: 156
Location: Punta Gorda, Florida USA

View user's profile Send private message Send e-mail

PostPosted: Mon Dec 10, 2018 8:27 am     Reply with quote

I stand corrected, you are totally correct the PCD compiler by default uses the standard ANSI which is by default a signed int. Sometimes simple things like this elude me and I get in trouble. Embarassed Embarassed
newguy



Joined: 24 Jun 2004
Posts: 1629
Location: Edmonton, Alberta

View user's profile Send private message

PostPosted: Mon Dec 10, 2018 9:24 am     Reply with quote

cbarberis wrote:
I stand corrected, you are totally correct the PCD compiler by default uses the standard ANSI which is by default a signed int. Sometimes simple things like this elude me and I get in trouble. Embarassed Embarassed


Hey it eluded me about 6 or 7 years ago too. That's why I always pipe up whenever the subject of signed/unsigned and the PCD compiler comes up. Very Happy
dluu13



Joined: 28 Sep 2018
Posts: 227
Location: Toronto, ON

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

PostPosted: Mon Dec 10, 2018 11:15 am     Reply with quote

I've been caught by signed/unsigned differences as well. Now I always #include <stdint.h> and use the int8_t/uint8_t etc when defining my variables so I know what I'm getting.
cbarberis



Joined: 01 Oct 2003
Posts: 156
Location: Punta Gorda, Florida USA

View user's profile Send private message Send e-mail

PostPosted: Mon Dec 10, 2018 11:23 am     Reply with quote

Good idea, I think from now on I will include these "signed and unsigned variable definitions" defines on my header file because you can spend a lot of times chasing problems that you don't need.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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