What platforms have something other than 8-bit char?

前端 未结 12 1262
再見小時候
再見小時候 2020-11-22 00:31

Every now and then, someone on SO points out that char (aka \'byte\') isn\'t necessarily 8 bits.

It seems that 8-bit char is almost universal. I would h

12条回答
  •  情话喂你
    2020-11-22 01:08

    ints used to be 16 bits (pdp11, etc.). Going to 32 bit architectures was hard. People are getting better: Hardly anyone assumes a pointer will fit in a long any more (you don't right?). Or file offsets, or timestamps, or ...

    8 bit characters are already somewhat of an anachronism. We already need 32 bits to hold all the world's character sets.

提交回复
热议问题