Raised This Month: $ Target: $400
 0% 

bool question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 04-23-2013 , 00:42   Re: bool question
Reply With Quote #1

@ conner. Thanks

@ YamiKaitou. so when using a bool. having if is less code so it's better?

just trying out new ways of doing things. And now I know my code was okay I can now work out what to use with it.
__________________
Blizzard_87 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-23-2013 , 01:15   Re: bool question
Reply With Quote #2

Quote:
Originally Posted by Blizzard_87 View Post
so when using a bool. having if is less code so it's better?
A switch is not intended to be used for booleans since a switch is designed for integers (when more than two cases are possible). Use an if statement.
__________________
fysiks is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 04-23-2013 , 01:21   Re: bool question
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
A switch is not intended to be used for booleans since a switch is designed for integers (when more than two cases are possible). Use an if statement.
thanks for your help guys
__________________

Last edited by Blizzard_87; 04-23-2013 at 01:21.
Blizzard_87 is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 04-23-2013 , 02:27   Re: bool question
Reply With Quote #4

Quote:
Originally Posted by Blizzard_87 View Post
@ conner.
Connor gonna get mad
Podarok is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 04-23-2013 , 02:34   Re: bool question
Reply With Quote #5

Quote:
Originally Posted by Podarok View Post
Connor gonna get mad
what's this got to do with bools?
__________________
Blizzard_87 is offline
Reply



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 10:53.


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