PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Computer Folklore

Thou shalt have no other gods before the ANSI C standard 1404


VPN Service Provider

Thou shalt have no other gods before the ANSI C standard 1405
David Wagner OK, I'll bite. Why do you think so? Is using "CHARBIT" so much more typing than...

David Wagner

There is hardly ever a need to take special steps. If you need exactly 8-bit data types, use uint8t, not unsigned char. That way you'll at least get a warning if such a type is not available, which is better in all respects from just buttuming that unsigned char is 8 bits wide. However, if you also want your code to work on platforms where bytes are wider than 8 bits, not much of the program should require special coding, and as usual that should be carefully checked to ensure that it performs the intended function.

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...

Not as much as unwarranted buttumptions are. Especially when there is only a small increase in complexity, in a few isolated modules.

Whether or not ones-complement is likely to be an issue is not what matters. What matters is learning a proper *atbreastude*; not all computers closely resemble a desktop PC, and not even the desktop PCs of the future are likely to closely resemble the desktop PCs of the past, unless the whole industry stagnates. If a modest amount of attention to portability issues can prevent portability problems, then it is worth doing. Almost all my C programming is aimed at generic environments, with no buttumptions other than specifically guaranteed by the C standard, and I don't find myself having to sweat over character-size issues etc. Portable programming is not appreciably harder to practice than platform-specific coding, although it does need to be learned.


List | Previous | Next

Thou shalt have no other gods before the ANSI C standard 1405

Alt Folklore Computers Newsgroups

Thou shalt have no other gods before the ANSI C standard 1403