| PLEX86 | ||
|
Thou shalt have no other gods before the ANSI C standard 1407
David Wagner ... snip ... Most of the time the code shouldn't care about 9 vs 8 bit bytes etc. It will be reading strings and integers etc. from streams, manipulating them, and writing them to streams. But once in a while something else comes up where byte love and or size matters. If the programmer never heard of these things he will use the unwarrented buttumptions. Otherwise he may handle it by simply commenting "this won't work under such and so conditions", or even use the #if .... #error mechanism. Thou shalt have no other gods before the ANSI C standard 1409 Randy Howard Those aren't 8-bit ports. Those are ports whose width matches the character size of... As a concrete example, I just advised someone who wanted to collect statistics on char use to form: Thou shalt have no other gods before the ANSI C standard 1408 David Wagner In C standardese, a byte is the addressable unit of storage from which... static unsigned long countsUCHARMAX + 1;* autozeroed * int ch; and process the data with: while (EOF != (ch = getc(f))) countsch++; which still has the hidden buttumption that no character will occur more than ULONGMAX times. But it has ensured that the index will never be out of range, which using an array of 256 entries would not. The cost was zero. -- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson
|
||||||||
Thou shalt have no other gods before the ANSI C standard 1408 Alt Folklore Computers Newsgroups Thou shalt have no other gods before the ANSI C standard 1406 |
||||||||