Must casting destroy lvalueness?
Stuart D. Gathman
stuart at BMS-AT.UUCP
Wed Oct 22 01:28:58 AEST 1986
In article <4617 at brl-smoke.ARPA>, NET-RELAY.ARPA>@brl-smoke.ARPA writes:
> For example, a useful and readable way to move a pointer
> through a buffer containing a mixture of objects of different sizes is
> ((OBJECT)pointer)++
A more correct syntax:
{
char *pointer;
/* . . . */
pointer += sizeof (OBJECT);
/* . . . */
}
And clearer to boot if you ask me.
--
Stuart D. Gathman <..!seismo!{vrdxhq|dgis}!BMS-AT!stuart>
More information about the Comp.lang.c
mailing list