Computer Science Canada boolean help |
Author: | why1234 [ Sat Jun 19, 2010 8:28 pm ] |
Post subject: | boolean help |
how do you use boolean? |
Author: | DtY [ Sat Jun 19, 2010 8:39 pm ] | ||
Post subject: | RE:boolean help | ||
If you have a more specific question, it might be possible to give meaningful help. |
Author: | Euphoracle [ Sat Jun 19, 2010 8:43 pm ] | ||||||
Post subject: | RE:boolean help | ||||||
A boolean is one of two things: true or false. You can create a variable for like like this:
Anything you evaluate that is either true or false, right or wrong, is a boolean. Eg.
Booleans are used to test conditions mostly. eg.
|
Author: | Monduman11 [ Sat Jun 19, 2010 10:43 pm ] | ||||||
Post subject: | Re: RE:boolean help | ||||||
Euphoracle @ Sat Jun 19, 2010 8:43 pm wrote: A boolean is one of two things: true or false. You can create a variable for like like this:
Anything you evaluate that is either true or false, right or wrong, is a boolean. Eg.
umm no offence but for the first 1 its true cause 5 is bigger than 3, i think u ment to write 3 > 5 not 5> 3 Booleans are used to test conditions mostly. eg.
|
Author: | Euphoracle [ Sat Jun 19, 2010 11:25 pm ] |
Post subject: | RE:boolean help |
whoops wrong key. |
Author: | Cezna [ Sun Jun 20, 2010 7:52 am ] |
Post subject: | Re: boolean help |
If you are unclear on what a boolean variable is, I suggest you read through a tutorial on Turing, either the one from Holtsoft, or this one. |
Author: | Insectoid [ Sun Jun 20, 2010 10:54 am ] |
Post subject: | RE:boolean help |
Or, even better, wikipedia, since booleans are global types and not restricted to Turing. Think about it this way. An integer can have any value from -max to max. A boolean can only have 0 to 1 (or false to true). |
Author: | andrew. [ Sun Jun 20, 2010 11:50 am ] |
Post subject: | RE:boolean help |
It's not 0 to 1, it's 0 or 1. |
Author: | TWizard [ Fri Jul 02, 2010 9:02 pm ] | ||
Post subject: | RE:boolean help | ||
Lol. You can do the same thing with number as you can with true or false. Boolean is mostly used in is statments try useing the built in guide or look though the online guides. Instead of posting something and not looking or just want to get the awnser. Here is a small example
In truth thats the slack way I hope its useful and dont always think people will give the awnser your looking for with out know what you want. |