K
Kenneth Brody
Douglas A. Gwyn said:Actually the C standard does require the digit codes to be contiguous
and ascending, so it is guaranteed to work on any conforming C
implementation.
I argued against this requirement, which infringes on the codeset
designer's turf, but lost the argument. (I would rather specify
macros/functions to convert between digit characters and
corresponding numeric interpretations.)
Baudot does not have the digits as contiguous values. But, then
again, it is also a 6 bit character set, whereas C specifies a
minimum of 8.
I can imagine a hardware device which uses something like the
7-segment LED displays as the character values. (ie: which bits
need to be set on in order to display the number 4?) I guess
any conforming C compiler would need to include a translation
layer in the I/O library on such a platform.
--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:[email protected]>