Show Summary Details

Quick Reference

The rules determining the order in which operations are carried out, if this is not defined unambiguously by brackets. For example, in most languages the expression a * b + c will be evaluated by doing the multiplication first, and brackets would be used to enforce the alternative order thus: a * (b + c) There is no consensus about precedence of operations in language, particularly when new operators may be introduced. A simple order used in Pascal is as follows:

a * b + c

a * (b + c)

unary NOT

multiplying operators

adding operators

relational operators

Other languages may have further operators such as exponentiation and further categories such as logic operators, whose position in the order would be defined. Operators of the same precedence are usually applied in order from left to right, but in some languages the order is undefined.

Subjects: Computing.

Reference entries

Users without a subscription are not able to see the full content. Please, subscribe or login to access all content.