Boolean variables
Boolean variables
Out of context: Reply #8
- Started
- Last post
- 10 Responses
- ********0
A boolean variable is really just a very small (two state) variable.
You could use other types of variable in it's place - but in situations where you're only checking for one of two states, using a different variable (data) type would be wasteful .. e.g. you'd be using more memory than you need to.
Maybe it would help to think of it as a bucket .. empty or full?
- sounds more like a switch - on or off.
bucket could be half full..... of shitAmicus - < true, that is half full of shit - the variable states translate to '0' (true) or 'not 0' (false), which is how you could possibly use another data type .. but you didn't really need the info; is prob unnecessarily confusing.********
- another data type .. but you didn't really need the info; is prob unnecessarily confusing.********
- GAH! false is 0, true is non-zero! Ignore me, I need coffee ..********
- sounds more like a switch - on or off.