IsUnsigned() function?

Scott C. Mac Phee macphee at convex.COM
Thu Jul 19 23:18:47 AEST 1990


I would think what we are really looking for is :

 o Assume (always) that the type we are checking is of type int.

int
IsUnsigned(x)
unsigned x ;
{
	return(x&(1<<(sizeof(int)-1))) ;
}

Scott

Convex Computer Corporation
...uunet!convex!macphee
(214) 497-4772



More information about the Comp.lang.c mailing list