In C, does an int have to be an exact number of chars
long?
Yes and no. It has to be made up of an integral number of chars in the
sense that sizeof(int) must be an integer. But those bits do not have
to all be value bits; some can be padding bits. Five seven-bit chars
plus one extra bit in a 36-bit word won't fly (and not just because of
the minimum information content of a char).
Of course, C being what it is, you might be better off scrapping formal
conformance to the spec and building a not-quite-C language that's more
useful on that hardware.
But, for that matter, how do you handle byte
operations if they're
not 6 bit/12 bit on a CDC 6600 in c? (60 bit words).
60-bit words? I'd be inclined to use 10-bit, or perhaps 12-bit, chars.
Whether it's reasonable to call those `bytes' depends on whether you
buy into the modern "`byte' means `octet'" interpretation.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse at
rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B