|
![](/i/fill.gif) |
clipka wrote:
> Happens to hardcore software developers, too. I once had some problems
> figuring out why some intended-to-be-portable C software library I had
> developed didn't run properly on a particular microcontroller - until
> finding out that a "char" data type (the smallest data type in C,
> typically equalling a byte) was actually 16 bits wide on that rascal. "A
> byte? What's that, Sir?" Doesn't make life easier when you're developing a
> portable library for a communications interface heavily based on the
> concept of the 8-bit thing.
A C 'char' type MUST be exactly 1 byte long (in particular, sizeof(char)
MUST be 1). However, a C implementation may define "byte" with more than 8
bits.
Post a reply to this message
|
![](/i/fill.gif) |