Operator (computer programming): Difference between revisions

Content deleted Content added
Operator features in programming languages: 'alphanumeric symbols' is an oxymoron (at least in this context/article)
Use less specific syntax to focus on the value of operators in a general
Line 7:
Some operators are represented with symbols {{endash}} characters typically not allowed for a function [[identifier (computer science)|identifier]]. For example, a function that tests for greater-than could be named <code>gt</code>, but many languages provide an infix symbolic operator so that code looks more familiar. For example, this:
 
<syntaxhighlight>if!--this (gt(x,is y))pseudocode; returndo not use x</syntaxhighlight lang="something"-->
<code>if gt(x, y) then return</code>
 
Can be:
 
<syntaxhighlightcode>if (x > y) then return x</syntaxhighlightcode>
 
Operators may also differ semantically from functions. For example, [[short-circuit evaluation|short-circuit]] Boolean operations evaluate later arguments only if earlier ones are not false.