View previous topic :: View next topic |
Author |
Message |
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
int8 or char variable? |
Posted: Wed May 01, 2013 4:20 pm |
|
|
Simple question....
I'm capturing a series of 8bit data on a port and will be storing the word in a variable to be formatted and printed at a later time. Which do you believe would be better, an int8 or a char for the variable? Or would it really matter?
Ronald |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19510
|
|
Posted: Wed May 01, 2013 4:26 pm |
|
|
Doesn't matter at all.
In some languages, using things like unicode, they are different, but in CCS (assuming PCH PCB or PCM), they are identical.
I'd probably use BYTE, since this is inherently unsigned, while int8 on most computers is signed (it isn't in CCS).
Best Wishes |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Wed May 01, 2013 4:40 pm |
|
|
Thanks. Figured as such but I thought I'd just make sure.
Ronald |
|
|
|