Is here someone who like & |

BlitzMax Forums/BlitzMax Beginners Area/Is here someone who like & |

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I find the precedence in Blitz to be the single most annoying 'feature' of operators.

By long tradition multiplication has higher precedence than addition. AND,OR are the logical analogs of Multiplication,Addition. In fact, they are often called logical product and logical sum.

Here is one obvious correspondence. Write out the multiplication table for the values 0,1. Then do the same for AND. You will notice the tables are identical.

This is why the C-style rules are consistent and reasonable:

Multiplication has higher precedence than Addition.
Logical And has higher precedence than Logical Or.
Bitwise And has higher precedence than Bitwise Or.


The Blitz approach, giving AND/OR the same precedence, is just wrong.