Ask about general coding issues or problems here.
2 posts • Page 1 of 1
To test a single boolean expression, an if statement is less code, and easier to read. Switch in my opinion is the best option when you have more than 3 distinct options you need to handle, but I also believe that if you're holding yourself to good programming practices your code shouldn't be trying to do so many things at once to where a switch statement should ever really be necessary. If you want to make huge jumps in progress in the way you program, you should read this book http://www.amazon.com/s?search-alias=st ... 0132350882 The author, 'Uncle' Bob Martin lays out some very easy to follow rules, and explanations for them, and examples that will help you code smarter and faster in ANY language
Who is online
Users browsing this forum: No registered users and 3 guests