Page 1 of 1

Origin of Cardinal=Dword?

Posted: Thu May 28, 2020 6:15 pm
by beethead
I was trying to find an alias for "dword" and from my Pascal experience the word "cardinal" comes to mind. The meaning of "dword" is very straight forward, double word or 4-bytes. Cardinal is a mathematical term but why was it chosen to represent a dword or 32-bit number?

Re: Origin of Cardinal=Dword?

Posted: Thu May 28, 2020 6:53 pm
by BitWise
Cardinals in Pascal are unsigned.
In the C world 'long' is at least 32-bits.

Re: Origin of Cardinal=Dword?

Posted: Thu May 28, 2020 7:14 pm
by BigEd
Indeed, cardinals are for counting, mathematically speaking, and unsigned numbers are also good for counting.