Re: How could a char be signed?



John Kelly wrote:
On Thu, 19 Aug 2010 10:50:23 +0100, Mark Bluemel
<mark_bluemel@xxxxxxxxx> wrote:

Ann On wrote:
I do not understand how a char could be a signed char.
All the ASCII char's are positive numbers.
Here's your misconception. You think that the char data type in C is about characters from a specific character set.

The char data type in C is an small integer type and integer types may be signed or unsigned.

That makes it sound like each character requires two bytes of memory.

Given that I later went on to mention that the name "byte" may have been better, that would seem a strange way to read what I wrote.

Some readers may think "short" where you wrote "small."

Readers capable of that level of misunderstanding would do well to avoid trying to program.


Choice of words can be misleading. It's no surprise C was designed by
Englishmen.

Really? I'm sure Dennis Ritchie would be interested to learn that.
.



Relevant Pages

  • Re: How could a char be signed?
    ... about characters from a specific character set. ... The char data type in C is an small integer type and integer types may ... That makes it sound like each character requires two bytes of memory. ...
    (comp.lang.c)
  • Re: How could a char be signed?
    ... about characters from a specific character set. ... The char data type in C is an small integer type and integer types may ... That makes it sound like each character requires two bytes of memory. ...
    (comp.lang.c)
  • Re: How could a char be signed?
    ... You think that the char data type in C is about characters from a specific character set. ... The char data type in C is an small integer type and integer types may be signed or unsigned. ...
    (comp.lang.c)
  • Re: How could a char be signed?
    ...  > All the ASCII char's are positive numbers. ... Here's your misconception. ... You think that the char data type in C is ... about characters from a specific character set. ...
    (comp.lang.c)