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
Author Message
diamond-optic
Veteran Member
Join Date: May 2005
Old 04-05-2009 , 15:04   breaking up an if statement into multiple if statements?
Reply With Quote #1

now i just wanna get an educated response on this cause i honestly am not sure if theres any benefit of one over the other.. and if there is, if its really enough of a benefit to make any difference

but say you have an if statement like this:
Code:
if(!this || !that || !something || !etc || whatever || evenmore || !yadayada)     return FMRES_IGNORED


im being told by someone that this is a better way to do it:
Code:
if(!this || !that)     return FMRES_IGNORED if(!something || !etc)     return FMRES_IGNORED if(whatever || evenmore)     return FMRES_IGNORED if(!yadayada)     return FMRES_IGNORED



so just hoping to get some clarification on this...
__________________
diamond-optic is offline
 


Thread Tools
Display Modes

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