IsUnsigned() function?

Peter Klausler pmk at craycos.com
Sat Jul 21 08:24:12 AEST 1990


macphee at convex.COM proposes:
> int
> IsUnsigned(x)
> unsigned x ;
> {
> 	return(x&(1<<(sizeof(int)-1))) ;
> }

>From this code I can conclude that Convex uses a 1-bit character set and that
a sign bit of 1 indicates a positive value, not a negative one. Amazing what's
being done in hardware these days, no?



More information about the Comp.lang.c mailing list