Rules Expressions :
Print this page

RULES FOR EVALUATION OF ANY EXPRESSION :

An expression can be interpreted in many different ways if parentheses are not mentioned in the expression.

  • For example the below given expression can be interpreted in many different ways:
  • Hence we specify some basic rules for evaluation of any expression :

A priority table is specified for the various type of operators being used:

 
   
PRIORITY LEVEL
OPERATORS
6
** ; unary - ; unary +
5
* ; /
4
+ ; -
3
<   ;  >   ;  <=  ;  >= ;    !>  ;  !<  ;   !=
2
Logical and operation
1
Logical or operation
   
Prev