How many "AND" condition checks can one use?

Blitz3D Forums/Blitz3D Beginners Area/How many "AND" condition checks can one use?

Galdy(Posted 2011) [#1]
If a and b and c and d and e.........etc. then


How many times can AND be used in one If statement?


Ross C(Posted 2011) [#2]
How many are you trying to use? You would probably reach a line limit before then I reckon. What are you trying to achieve? And you can always use nested If statements.


jfk EO-11110(Posted 2011) [#3]
I think there is no limit. The compiler is parsing the line from right to left (afaik), turning your conditions to true or false one by one. I agree with Ross, there may be a line length limit.


Abomination(Posted 2011) [#4]
If (You are using And) And (You don't want to be (confused Or mistaken)) then You better use (brackets)()


Yasha(Posted 2011) [#5]
There is no limit. "And" is an arithmetic operator and has nothing to do with "If" statements as such.

(At least, Blitz3D may have undocumented line limits or parser bugs... but in theory, neither exist.)

Last edited 2011


Galdy(Posted 2011) [#6]
Thanks for the replies. I cleaned up what was doing so as to make it unnecessary. I was curiose if there was a limit though. I would never go nuts with it anyway with the limits of the IDE. lol.


_PJ_(Posted 2011) [#7]
You can always shorten the lines a little by using "*" for 'And' and "+" for "Or" ;)