B
Ben Bacarisse
Keith Thompson said:Because no value can be a trap representation.
Ah yes. I don't know what I was thinking.
Keith Thompson said:Because no value can be a trap representation.
Richard said:CBFalconer said:
Because on a non-ASCII machine, it won't write ASCII. It will write
the native character set. For example, on a typical IBM mainframe
using EBCDIC, if you call it thusly:
Malcolm said:unsigned char is, signed char not.
However signed char is guaranteed 8 bits, so in fact it can hold
ASCII codes. Plain char must be an alias for either signed char
or unsigned char. So Keith Thompson actually squeaks through.
CBFalconer said:And the chars in the basic execution set must always be positive.
This forces EBCDIC based systems to used unsigned char as the type
for char. on byte machines.
CBFalconer said:Don't be a slave to the OPs misnaming of the routine. He wants to
write a string. The routine will write whatever characters have
been placed in the string, and the char format doesn't matter.
That is one more reason the C standard doesn't specify the char
coding.
He doesn't even need the "fputc(0, fp);" line.
Is that so?
6.2.6.2p1: "For unsigned integer types other than unsigned char, ...I'm not seeing a distinction between unsigned char and signed char
when it comes to trap representations.
That's 1256, by the way - do you have another reference, or a
paragraph within 1256 which says something different?
David Thompson said:..
Is that so?6.2.6.2p1: "For unsigned integer types other than unsigned char, ...I'm not seeing a distinction between unsigned char and signed char
when it comes to trap representations.
That's 1256, by the way - do you have another reference, or a
paragraph within 1256 which says something different?
padding bits [are allowed]" which allows trap reps; for uchar without
padding (or sign) only 'pure binary' value bits, there is no trap rep.
and p2: "For signed integer types ... padding bits [are allowed] ...
[and max-neg can be a trap representation]".
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.