Jump to content
  • Advertisement
Sign in to follow this  
simon10k

char question

This topic is 4618 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Quote:
Original post by Konfusius
Yes. Only Extended ASCII characters [128:255] are subject to sign issues. (is that valid english? o_O)

yes it is. congratulations.
you'll find that most americans unlike their british counterparts don't worry about valid english. [grin]

Share this post


Link to post
Share on other sites
Isn't there supposedly some horrible system somewhere with 7 bit characters, meaning [64:127] could be negative?

Not that I care, I regularly make the probably false assumption that char is at least 8 bits.

Share this post


Link to post
Share on other sites
Quote:
Original post by smart_idiot
Isn't there supposedly some horrible system somewhere with 7 bit characters?

Not that I care, I regularly make the probably false assumption that char is at least 8 bits.


You can store the full ascii set in 7 bits (0-127), so I suppose that you could have to deal with -ve ascii chars, but very few people ever use platforms with non-8 bit chars (for game development).

Quote:
Original post by Alpha_ProgDes
Quote:
Original post by Konfusius
Yes. Only Extended ASCII characters [128:255] are subject to sign issues. (is that valid english? o_O)

yes it is. congratulations.
you'll find that most americans unlike their british counterparts don't worry about valid english. [grin]


Bah, humbug.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by smart_idiot
Isn't there supposedly some horrible system somewhere with 7 bit characters, meaning [64:127] could be negative?

Not that I care, I regularly make the probably false assumption that char is at least 8 bits.


CHAR_BIT is required to be at least 8 bits by the ISO C standard. The ISO C++ standard defines CHAR_BIT in terms of the ISO C standard. Thus, char is at least 8 bits. More directly, CHAR_MAX is required to be at least 127. (CHAR_MAX is equivalent to either SCHAR_MAX (at least 127) or UCHAR_MAX (at least 255), depending on whether char is treated as signed or unsigned.)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!