|
-
March 9th, 2004, 08:21 PM
#5
Of course (due to what may be a type) the code in the first example may actually run twice, where this can not happen in the secondand third.
If that is a typo, then option 3 will typically b the best bet. Remember to put the most likely (if there is one) condition first to get maximum benefit from short circuiting.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|