Why SmallInt are 31 bits signed integers

Paul Dufresne dufrp at hotmail.com
Thu Oct 14 07:48:05 PDT 2004


To answer Pupeno question on IRC log:

SmallInt are 31 bits, because bit 0 serve to tell if it is a pointer (bit 
set to 1),
or a SmallInt (bit 0 set to 0).

That's why you had to do >> 1 in your C code, to divide them by two.
(Trick that won't work with negatives value).

--Paul





More information about the Slate mailing list