CompuServe Messages

Do we char?

#: 117640 S10/ProgrammingForum unknown
    06-Apr-88 02:16:42
Sb: Do we char?
Fm: John Foust 72237,135
To: Nick Sullivan/Transactor 76703,4353

This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.

Nick, it had been bugging me for weeks since we talked about this. You once asked if Standard C declared 'char' to be signed or unsigned. I had hoped it was definite. The latest C Users Journal has an article by PJ Plauger on Standard C types. Type 'char' is guaranteed to be at least eight bits. They decided in favor of efficiency, leaving the decision to the compiler writer. Presumably, the compiler writer chooses the most efficient method in terms of storage and signed-integer encoding and math on a given processor. Of course, you have type specifier keywords like 'signed' and 'unsigned' to specify signedness. Plauger mentioned that on a Cray, int, long and char are all the same size: 64 bits.