When it is amoral... (Re: When is a cast not a cast?)

Peter da Silva peter at ficc.uu.net
Sun May 7 13:03:30 AEST 1989


In article <127 at quad.uucp>, dts at quad.uucp (David T. Sandberg) writes:
> It is?  What about when the difference between the two is an odd
> number of multibyte units?

You have to align the result before using it, of course.

> >(what's the average of the 7 clubs and the 9 clubs?)

> More to the point, what's the difference between the 7 clubs and the
> 8 clubs?

	clubs_t clubs[13];

	printf("%d\n", &clubs[7]-&clubs[8]);

The result better be -1.
-- 
Peter da Silva, Xenix Support, Ferranti International Controls Corporation.

Business: uunet.uu.net!ficc!peter, peter at ficc.uu.net, +1 713 274 5180.
Personal: ...!texbell!sugar!peter, peter at sugar.hackercorp.com.



More information about the Comp.lang.c mailing list