On 11/10/2010 10:52 AM, Andy Pugh wrote:
> On 10 November 2010 14:15, Mark Wendt<[email protected]>  wrote:
>
>    
>> The compiler would see that first statement as a short circuit eval, and
>> always correctly evaluate it as your second form.
>>      
> How about:
>
>   if(new_in&&  new_in -= start_in)
>
> ?
If it's C code, and new_in = 0, new_in -= start_in will not be 
evaluated.  If new_in is greater than or equal to 1, it would then 
evaluate the value of new_in to the decremented value of start_in.  If 
that value is is not equal, the statement is false, and it will return 
false.  (I think...  ;-))

Mark

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to