Afficher un message
Vieux 13/04/2008, 20h45   #14
Richard Heathfield
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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
  Réponse avec citation
 
Page generated in 0,05891 seconds with 9 queries