Operator (computer programming): Difference between revisions

Content deleted Content added
Conventionally, the computing usage of "operator" goes beyond the set of common arithmetic operators. ; See Operators in C and C Plus Plus.
Line 1:
[[Programming languages]] have a set of '''[[operator]]s''' that perform arithmetical operations, and others such as Boolean operations on truth values, and string operators manipulating [[literal string|strings of text]]. Computers are mathematical devices, but [[compiler]]s and [[interpreter]]s require a full syntactic theory of all operations in order to parse formulae involving any combinations correctly. In particular they depend on [[operator precedence]] rules, on [[order of operations]], that are tacitly assumed in mathematical writing.
 
Conventionally, the computing usage of "operator" goes beyond the set of common arithmetic operators. The [[C programming language]] for example also supports operators like <tt>&</tt>, <tt>++</tt> and <tt>sizeof</tt>. Operators like <tt>sizeof</tt>, which are alphanumeric rather than a mathematical symbol or a punctuation character, it is sometimes called a ''named operator''. See [[Operators in C and C Plus Plus|Operators in C and C++]].
 
In certain programming languages, such as [[PostScript programming language|PostScript]], the use of the word "operator" has more specific meaning, in that an operator is an executable element in the stack. Because operators here are always written postfix, the need for parentheses is redundant as the way objects are taken from the stack ensures correct evaluation. This is an example of [[Reverse Polish notation]].