New assignment operator ->= ?
Rob "The" Mayoff
mayoff at walt.cc.utexas.edu
Fri Feb 16 15:55:16 AEST 1990
It occurred to me some time ago that every binary operator in C (except the
logical ones - &&, ||)) except one have an analogous assignment operator:
+ has +=, - has -=, & has &=, etc.
Well, what about ->? In tracing linked lists, I often do something like:
p = head;
while (*p->next)
p = p->next;
to get to the end, or something similar. So why not
p = head;
while (*p->next)
p ->= next;
Anyone else agree?
__
/\_\ Rob Mayoff
\/_/ mayoff at ccwf.cc.utexas.edu
More information about the Comp.lang.c
mailing list