Re: strange call
- From: Richard Heathfield <invalid@xxxxxxxxxxxxxxx>
- Date: Sun, 19 Nov 2006 21:38:51 +0000
f() = 'x';
"Richard Heathfield" wrote...
At the cost of considerable trouble and inconvenience for Kavya, who has
It's a perfectly legal shorthand for:
int *p = f();
p = 'x';
without going to all the trouble and inconvenience of defining a
temporary object p to store the pointer value returned by f.
the unhappy task of reading this code.
Yes. I'm not overly keen on it either, but occasionally I've been guilty of
the equivalent, *strchr(foo, bar) = baz, when I knew for sure that bar
appears in foo. Tsk tsk, as they say...
"Usenet is a strange place" - dmr 29/7/1999
email: normal service will be restored as soon as possible. Please do not
adjust your email clients.
- Prev by Date: Re: strange call
- Next by Date: Re: How to know how many files are into a directory
- Previous by thread: Re: strange call
- Next by thread: Re: strange call