0

How many bools can I connect?? e.g.

if((x>j) || (y<t) || (m=c) && (x != 0))

Please pardon any improper syntax, and any guidance is greatly appreciated

(My text doesn't go into great detail with bools, but we're working with classes right now, and in one example there are three "ors" connected in a bool - this type of the thing would be very helpful for my current homework project)

Thanx
Rick

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by guitarrick
0

> How many bools can I connect??
As many as you like

> How many bools SHOULD you connect?
Usually a lot less.
One set of && and one set of || is about the limit of what would be easy to understand and test for.

If you were being pedantic, each bool you add DOUBLES the number of tests you need to perform in order to prove the code is correct. If you get too creative, there's no way that you can test the code.

0

> How many bools can I connect??
As many as you like

> How many bools SHOULD you connect?
Usually a lot less.

Salem,
Thank you, your warnings and info. are heeded and appreciated

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.