Hi,

I am having some trouble understanding the predicates and would really
appreciate some explanation.

/* Predicates */
#define isNil(x)        ((x)==Nil)
#define isTxt(x)        (num(x)&1)
#define isNum(x)        (num(x)&2)
#define isSym(x)        (num(x)&WORD)
#define isSymb(x)       ((num(x)&(WORD+2))==WORD)
#define isCell(x)       (!(num(x)&(2*WORD-1)))

I can understand isTxt and isNum - bit 1 set means it's text and bit 2 set
means its number. However, why is WORD used for isSym? Could it not have
been just 4 and why is does it have to be sizeof(long) - which is also 4 on
32bit but I cant follow the logic. Similarly, isSymb and isCell are
confusing to me.

Regards,
Kashyap

Reply via email to