Raised This Month: $ Target: $400
 0% 

breaking up an if statement into multiple if statements?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
stupok
Veteran Member
Join Date: Feb 2006
Old 04-05-2009 , 15:20   Re: breaking up an if statement into multiple if statements?
Reply With Quote #4

If you're hoping to avoid checking the values, make sure you put them in the following order:

if( !most_likely_to_be_zero || ... || ... || ... || !least_likely_to_be_zero )

or, more clearly:

if( most_likely_to_be_true || ... || ... || ... || least_likely_to_be_true )

EDIT: wow, a lot of posts at once O_O
__________________
stupok is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode