It\'s something that\'s bugged me in every language I\'ve used, I have an if statement but the conditional part has so many checks that I have to split it over multiple lines, u
If you happen to be programming in Python, it's a cinch with the built-in all()
function applied over the list of your variables (I'll just use Boolean literals here):
>>> L = [True, True, True, False, True]
>>> all(L) # True, only if all elements of L are True.
False
>>> any(L) # True, if any elements of L are True.
True
Is there any corresponding function in your language (C#? Java?). If so, that's likely the cleanest approach.