Dynamic arrays, basic type names, auto

Markus Koskimies markus at reaaliaika.net
Thu Jul 10 22:21:26 PDT 2008


On Fri, 11 Jul 2008 00:53:28 -0400, Jarrett Billingsley wrote:

>>> A "word" is well-defined to be the native data size of a given chip
>>> (memory, cpu, etc). People who have done a lot of PC programming tend
>>> to forget that or be unaware of it and end up with the mistaken
>>> inpression that it's well-defined to be "two bytes", which has never
>>> been true in the general-case.
>>
>> Hmmh, I disagree. "word" might mean in the history the width of the
>> processor data paths, but nowadays it is 16-bit unsigned even in
>> microcontrollers and DPSs (although DSPs rarely follow fixed width of
>> processor words, e.g. having 20-bit data path, 24/48-bit special
>> registers and accessing memory with 16-bit granularity).
> 
> I get the impression that people who think that "word == 2 bytes" tend
> to be long-time Windows programmers.  Since that's, well, pretty much
> the only place where that's true.

Well, yes, basically, the word being 16-bit dates back to the history of 
8086.

But anyway, it is nowadays very common in other architectures, too, like 
ARM. I may remember falsely, but MC68000 series had the same definitions? 
And like I said, there certainly are processors, which word size is 
completely different to 16-bits, but if you are programming them with C 
(and many times with assembler also), the short/word is 16 bits. And yes, 
there are exceptions.



More information about the Digitalmars-d mailing list