OR ???

Blitz3D Forums/Blitz3D Programming/OR ???

There is no flag with number 3 in Blitz, just because all the flags must be multiple of 2 to work, so, when we are talking about flags, + and Or does the same work.

The advantage of using Or is that you cannot accidentally add the same flag two times. Imagine that, instead of passing the flags directly into the function, you store them into a variable. It is easy to accidentally add the same flag two times when you're using +, if the code which sets the flags is too complex. If you use Or, if the flag has been added once, it won't add the number again to the flags.