[Digital-X-Treme]
Mar 4th, 2001, 12:11 PM
I have a few questions on operator presedence that i need confirming.
I have the following operators. The lower the number after the operator, the higher the presedence.
Equals: "=" 0
Is equal to: "==" 1
Not equal to: "!=" 1
Greater than or equal to: ">=" 1
Less than or equal to: "<=" 1
Less than: "<" 1
More than: ">" 1
Power: "^" 2
Multiply: "*" 3
Division: "/" 3
Integer Division: "\" 3
Mod "%" 3
And "&" 4
Or "|" 4
Addition "+" 4
Minus "-" 4
What i need to know is this.
1. Is the 'integer division operator' (\) of equal presedence to "/" and "*"? (as i assume it is)
2. I am assuming that '&' and "|" are of the same presedence as "+" and "-", and that "%" is of the same presedence as "/" and "*". Is this correct?
1. Basically, are they in the correct order of presedence? :)
Any contributions appreciated. Thanks in advance.
Later
I have the following operators. The lower the number after the operator, the higher the presedence.
Equals: "=" 0
Is equal to: "==" 1
Not equal to: "!=" 1
Greater than or equal to: ">=" 1
Less than or equal to: "<=" 1
Less than: "<" 1
More than: ">" 1
Power: "^" 2
Multiply: "*" 3
Division: "/" 3
Integer Division: "\" 3
Mod "%" 3
And "&" 4
Or "|" 4
Addition "+" 4
Minus "-" 4
What i need to know is this.
1. Is the 'integer division operator' (\) of equal presedence to "/" and "*"? (as i assume it is)
2. I am assuming that '&' and "|" are of the same presedence as "+" and "-", and that "%" is of the same presedence as "/" and "*". Is this correct?
1. Basically, are they in the correct order of presedence? :)
Any contributions appreciated. Thanks in advance.
Later