Re: `if (!p ? i++ : 0) break;' == `if (!p){ i++; break;}' ?
Keith Thompson said:
> "lovecreatesbea...@gmail.com" <lovecreatesbeauty@gmail.com> writes:
>> Are the following two lines equal? Suppose the expression i++ doesn't
>> overflow. They behave differently in my code.
>>
>> if (!p ? i++ : 0) break;
>>
>> if (!p){ i++; break;}
>>
>> Thank you for your time.
>
> Apart from any difference in behavior,
....which we will take as read...
> the first is ugly.
No difference there, then.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
|