<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Operator_%28computer_programming%29</id>
	<title>Operator (computer programming) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Operator_%28computer_programming%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Operator_(computer_programming)&amp;action=history"/>
	<updated>2026-06-20T04:48:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.sarg.dev/index.php?title=Operator_(computer_programming)&amp;diff=515279&amp;oldid=prev</id>
		<title>~2025-33335-43: specific, individual language</title>
		<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Operator_(computer_programming)&amp;diff=515279&amp;oldid=prev"/>
		<updated>2025-11-15T15:08:06Z</updated>

		<summary type="html">&lt;p&gt;specific, individual language&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Basic programming language construct}}&lt;br /&gt;
{{refimprove|date=January 2019}}&lt;br /&gt;
{{About|operators in computer programming|other uses|Operator (disambiguation)}}&lt;br /&gt;
&lt;br /&gt;
In [[computer programming]], an &amp;#039;&amp;#039;&amp;#039;operator&amp;#039;&amp;#039;&amp;#039; is a [[programming language]] construct that provides functionality that may not be possible to define as a user-defined [[Function (computer programming)|function]] (i.e. [[sizeof]] in [[C (programming language)|C]]) or has [[Syntax (programming languages)|syntax]] different than a function (i.e. [[Infix notation|infix]] addition as in &amp;lt;code&amp;gt;a+b&amp;lt;/code&amp;gt;). Like other programming language concepts, &amp;#039;&amp;#039;operator&amp;#039;&amp;#039; has a generally accepted, although debatable meaning among practitioners while at the same time each language gives it specific meaning in that context, and therefore the meaning varies by individual language. &lt;br /&gt;
&lt;br /&gt;
Some operators are represented with symbols {{endash}} characters typically not allowed for a function [[identifier (computer science)|identifier]] {{endash}} to allow for presentation that is more familiar looking than typical function syntax. For example, a function that tests for greater-than could be named &amp;lt;code&amp;gt;gt&amp;lt;/code&amp;gt;, but many languages provide an infix symbolic operator so that code looks more familiar. For example, this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--this is pseudocode; do not use syntaxhighlight lang=&amp;quot;something&amp;quot;--&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;if gt(x, y) then return&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;if x &amp;gt; y then return&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some languages allow a language-defined operator to be overridden with user-defined behavior and some allow for user-defined operator symbols.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Differences from functions ==&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
Many operators differ syntactically from user-defined functions. In most languages, a function is [[prefix notation]] with fixed [[Order of operations|precedence]] level and associativity and often with compulsory [[parentheses]] (e.g. &amp;lt;code&amp;gt;Func(a)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;(Func a)&amp;lt;/code&amp;gt; in [[Lisp (programming language)|Lisp]]). In contrast, many operators are infix notation and involve different use of delimiters such as parentheses. &lt;br /&gt;
&lt;br /&gt;
In general, an operator may be prefix, infix, postfix, [[matchfix]], [[circumfix]] or bifix,&amp;lt;ref&amp;gt;{{Cite web|url=https://reference.wolfram.com/language/tutorial/OperatorInputForms.html.en|title=Operator Input Forms—Wolfram Language Documentation|website=reference.wolfram.com}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web|url=https://maxima.sourceforge.net/docs/manual/maxima_7.html|title=Maxima 5.42.0 Manual: 7. Operators|website=maxima.sourceforge.net}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web|url=https://mythryl.org/my-Prefix__Postfix_and_Circumfix_Operators.html|title=Prefix, Postfix and Circumfix Operators|website=mythryl.org}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web|url=http://doc.perl6.org/language/operators#___top|title=Operators|website=doc.perl6.org}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=Pribavkina&amp;gt;{{cite book | last1=Pribavkina | first1=Elena V. | last2=Rodaro | first2=Emanuele | title=Developments in Language Theory | chapter=State Complexity of Prefix, Suffix, Bifix and Infix Operators on Regular Languages | series=Lecture Notes in Computer Science | date=2010 | volume=6224 | pages=376–386 | doi=10.1007/978-3-642-14455-4_34 | isbn=978-3-642-14454-7 }}&amp;lt;/ref&amp;gt; and the syntax of an [[expression (computer science)|expression]] involving an operator depends on its [[arity]] (number of [[operand]]s), precedence, and (if applicable), [[Operator associativity|associativity]]. Most programming languages support [[binary operator]]s and a few [[unary operation|unary operators]], with a few supporting more operands, such as the [[?:]] operator in C, which is ternary. There are prefix unary operators, such as unary minus &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt;, and postfix unary operators, such as [[post-increment]] &amp;lt;code&amp;gt;x++&amp;lt;/code&amp;gt;; and binary operations are infix, such as &amp;lt;code&amp;gt;x + y&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;x = y&amp;lt;/code&amp;gt;. Infix operations of higher arity require additional symbols, such as the [[ternary operator]] ?: in C, written as &amp;lt;code&amp;gt;a ? b : c&amp;lt;/code&amp;gt; – indeed, since this is the only common example, it is often referred to as &amp;#039;&amp;#039;the&amp;#039;&amp;#039; ternary operator. Prefix and postfix operations can support any desired arity, however, such as &amp;lt;code&amp;gt;1 2 3 4 +&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Semantics ===&lt;br /&gt;
The semantics of an operator may significantly differ from that of a normal function. For reference, addition is evaluated like a normal function. For example, &amp;lt;code&amp;gt;x + y&amp;lt;/code&amp;gt; can be equivalent to a function &amp;lt;code&amp;gt;add(x, y)&amp;lt;/code&amp;gt; in that the arguments are evaluated and then the functional behavior is applied. However, [[Assignment_(computer_science)|assignment]] is different. For example, given &amp;lt;code&amp;gt;a = b&amp;lt;/code&amp;gt; the target &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; is &amp;#039;&amp;#039;not&amp;#039;&amp;#039; evaluated. Instead its value is replaced with the value of &amp;lt;code&amp;gt;b&amp;lt;/code&amp;gt;. The [[scope resolution operator|scope resolution]] and element access operators (as in &amp;lt;code&amp;gt;Foo::Bar&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;a.b&amp;lt;/code&amp;gt;, respectively, in the case of e.g. [[C++]]) operate on identifier names; not values.&lt;br /&gt;
&lt;br /&gt;
In C, for instance, the array indexing operator can be used for both read access as well as assignment. In the following example, the  [[increment and decrement operators|increment operator]] reads the element value of an array and then assigns the element value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=c&amp;gt;&lt;br /&gt;
++a[i];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The C++ &amp;lt;code&amp;gt;&amp;amp;lt;&amp;amp;lt;&amp;lt;/code&amp;gt; operator allows for [[fluent interface|fluent]] syntax by supporting a sequence of operators that affect a single argument. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=cpp&amp;gt;&lt;br /&gt;
cout &amp;lt;&amp;lt; &amp;quot;Hello&amp;quot; &amp;lt;&amp;lt; &amp;quot; &amp;quot; &amp;lt;&amp;lt; &amp;quot;world!&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ad hoc polymorphic ==&lt;br /&gt;
{{further|Ad hoc polymorphism}}&lt;br /&gt;
Some languages provide operators that are &amp;#039;&amp;#039;&amp;#039;ad hoc polymorphic&amp;#039;&amp;#039;&amp;#039; {{endash}} inherently overloaded. For example, in [[Java (programming language)|Java]] the {{code|+}} operator sums [[number]]s or [[concatenate]]s [[String (computer science)|strings]].&lt;br /&gt;
&lt;br /&gt;
== Customization ==&lt;br /&gt;
Some languages support user-defined  [[operator overloading|overloading]] (such as [[C++]] and [[Fortran]]). An operator, defined by the language, can be [[function overloading|overloaded]] to behave differently based on the type of input.&lt;br /&gt;
&lt;br /&gt;
Some languages (e.g. C, C++ and [[PHP]]) define a fixed set of operators, while others (e.g. [[Prolog]],&amp;lt;ref&amp;gt;{{Cite web|url=https://www.swi-prolog.org/pldoc/man?predicate=op/3|title=SWI-Prolog -- op/3|website=www.swi-prolog.org}}&amp;lt;/ref&amp;gt; [[F Sharp (programming language)|F#]], [[OCaml]], [[Haskell]]) allow for user-defined operators. Some programming languages restrict operator symbols to special characters like {{mono|1=&amp;#039;&amp;#039;&amp;#039;[[Addition|+]]&amp;#039;&amp;#039;&amp;#039;}} or {{mono|1=&amp;#039;&amp;#039;&amp;#039;[[Assignment (computer science)|:=]]&amp;#039;&amp;#039;&amp;#039;}} while others allow names like &amp;lt;code&amp;gt;[[Integer_division#Division_of_integers|div]]&amp;lt;/code&amp;gt; (e.g. [[Pascal (programming language)|Pascal]]), and even arbitrary names (e.g. [[Fortran]] where an upto 31 character long operator name is enclosed between dots&amp;lt;ref name=&amp;quot;IntelFortran&amp;quot;&amp;gt;{{cite web |title=Defined Operations |url=https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2023-0/defined-operations.html |publisher=Intel |access-date=6 May 2025}}&amp;lt;/ref&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Most languages do not support user-defined operators since the feature significantly complicates parsing. Introducing a new operator changes the arity and precedence [[lexical specification]] of the language, which affects phrase-level [[lexical analysis]]. Custom operators, particularly via runtime definition, often make correct [[static analysis]] of a program impossible, since the syntax of the language may be Turing-complete, so even constructing the syntax tree may require solving the halting problem, which is impossible. This occurs for [[Perl]], for example, and some dialects of [[Lisp (programming language)|Lisp]].&lt;br /&gt;
&lt;br /&gt;
If a language does allow for defining new operators, the mechanics of doing so may involve meta-programming {{endash}} specifying the operator in a separate language.&lt;br /&gt;
&lt;br /&gt;
== Operand coercion ==&lt;br /&gt;
{{further|Type conversion}}&lt;br /&gt;
Some languages implicitly convert (aka [[Type conversion#Implicit type conversion|coerce]]) operands to be compatible with each other. For example, [[Perl]] coercion rules cause &amp;lt;code&amp;gt;12 + &amp;quot;3.14&amp;quot;&amp;lt;/code&amp;gt; to evaluate to &amp;lt;code&amp;gt;15.14&amp;lt;/code&amp;gt;. The string literal &amp;lt;code&amp;gt;&amp;quot;3.14&amp;quot;&amp;lt;/code&amp;gt; is converted to the numeric value 3.14 before addition is applied. Further, &amp;lt;code&amp;gt;3.14&amp;lt;/code&amp;gt; is treated as floating point so the result is floating point even though &amp;lt;code&amp;gt;12&amp;lt;/code&amp;gt; is an integer literal. [[JavaScript]] follows different rules so that the same expression evaluates to &amp;lt;code&amp;gt;&amp;quot;123.14&amp;quot;&amp;lt;/code&amp;gt; since &amp;lt;code&amp;gt;12&amp;lt;/code&amp;gt; is converted to a string which is then concatenated with the second operand.&lt;br /&gt;
&lt;br /&gt;
In general, a programmer must be aware of the specific rules regarding operand coercion in order to avoid unexpected and incorrect behavior.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
{{category see also|Operators (programming)}}&lt;br /&gt;
&lt;br /&gt;
;Mathematical operators&lt;br /&gt;
* [[Arithmetic]]: such as addition, &amp;lt;code&amp;gt;a {{red|+}} b&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[Relational operator|Relational]]: such as [[Greater-than sign|greater than]], &amp;lt;code&amp;gt;a {{red|&amp;amp;gt;}} b&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[Mathematical logic|Logic]]: such as &amp;lt;code&amp;gt;a {{red|AND}} b&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;a {{red|&amp;amp;amp;&amp;amp;amp;}} b&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[Assignment (computer science)|Assignment]]: such as &amp;lt;code&amp;gt;a {{red|&amp;amp;equals;}} b&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;a {{red|:&amp;amp;equals;}} b&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[Three-way comparison]] (aka spaceship): &amp;lt;code&amp;gt;x {{red|&amp;amp;lt;&amp;amp;equals;&amp;amp;gt;}} y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Program structure operators&lt;br /&gt;
* [[Record (computer science)|Record]] or [[Object (computer science)|object]] [[Field (computer science)|field]] access: such as &amp;lt;code&amp;gt;a{{red|.}}b&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[scope resolution operator|Scope resolution]]: such as &amp;lt;code&amp;gt;a{{red|::}}b&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;a{{red|.}}b&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Conditional operators&lt;br /&gt;
* [[Ternary conditional operator|Ternary conditional]]: &amp;lt;code&amp;gt;condition {{red|?}} a {{red|:}} b&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[Elvis operator|Elvis]]: &amp;lt;code&amp;gt;x {{red|?:}} y&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[Null coalescing operator|Null coalesing]]: &amp;lt;code&amp;gt;x {{red|??}} y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Notable C and C++ operators&lt;br /&gt;
* Address-of operator: &amp;lt;code&amp;gt;{{red|&amp;amp;amp;}}x&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[Dereference operator|Dereference]]: &amp;lt;code&amp;gt;{{red|*}}p&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[Comma operator|Comma]]: &amp;lt;code&amp;gt;e{{red|,}} f&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{anchor|Compound operator|Fused operation}}&lt;br /&gt;
;Compound operators&lt;br /&gt;
* [[compound assignment operator|Compound assignment]] (aka augmented assignment) in C/C++: &amp;lt;code&amp;gt;+=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;&amp;lt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;^=&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;|=&amp;lt;/code&amp;gt; &lt;br /&gt;
* [[fused operation|Fused]]: such as [[cis (mathematics)|{{math|1=cis &amp;#039;&amp;#039;x&amp;#039;&amp;#039; = cos &amp;#039;&amp;#039;x&amp;#039;&amp;#039; + &amp;#039;&amp;#039;i&amp;#039;&amp;#039; sin &amp;#039;&amp;#039;x&amp;#039;&amp;#039;}}]]&lt;br /&gt;
&lt;br /&gt;
== Operator features in programming languages ==&lt;br /&gt;
The following table shows the operator features in several programming languages:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;sortable wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Language&lt;br /&gt;
!Symbolic operators&lt;br /&gt;
!Alphanumeric operators&lt;br /&gt;
! {{verth|Prefix}}&lt;br /&gt;
! {{verth|Infix}}&lt;br /&gt;
! {{verth|Postfix}}&lt;br /&gt;
! {{verth|Precedence}}&lt;br /&gt;
! {{verth|Associativity}}&lt;br /&gt;
! {{verth|Overloading}}&lt;br /&gt;
! {{verth|User-defined&amp;lt;br/&amp;gt;overloading}}&lt;br /&gt;
! {{verth|User-defined&amp;lt;br/&amp;gt;symbols}}&lt;br /&gt;
|-&lt;br /&gt;
| [[ALGOL 68]] &amp;lt;small&amp;gt;each symbolic operator has an alphanumeric equivalent and some a non-[[ASCII]] equivalent&amp;lt;/small&amp;gt;&lt;br /&gt;
| {{code|1=+* ** * / % %* %× - + &amp;amp;lt; &amp;amp;lt;= &amp;gt;= &amp;gt; = /= &amp;amp; -:= +:= *:= /:= %:= %*:= +=: :=: :/=:}}&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;non-ASCII:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{{code|1=¬ +× ⊥ ↑ ↓ ⌊ ⌈ × ÷ ÷× ÷* □ ≤ ≥ ≠ ∧ ∨ ×:= ÷:= ÷×:= ÷*:= %×:= :≠:}}&lt;br /&gt;
| {{code|not abs arg bin entier leng level odd repr round shorten i shl shr up down lwb upb lt le ge gt eq ne and or over mod elem minusab plusab timesab divab overab modab plusto is {{Not a typo|isnt}}}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{Yes}} &amp;lt;small&amp;gt;(prefix operators always have priority 10)&amp;lt;/small&amp;gt;&lt;br /&gt;
| Infix operators are left associative, prefix operators are right associative&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[APL (programming language)|APL]]&lt;br /&gt;
| {{code|1=+ - × ÷ ⌈ ⌊ * ⍟ &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; ! ○ ~ ∨ ∧ ⍱ ⍲ &amp;amp;lt; ≤ = ≥ &amp;gt; ≠ . @ ≡ ≢ ⍴ , ⍪ ⍳ ↑ ↓ ? ⍒ ⍋ ⍉ ⌽ ⊖ ∊ ⊥ ⊤ ⍎ ⍕ ⌹ ⊂ ⊃ ∪ ∩ ⍷ ⌷ ∘ → ← / ⌿ \ ⍀ ¨ ⍣ &amp;amp; ⍨ ⌶ ⊆ ⊣ ⊢ ⍠ ⍤ ⌸ ⌺ ⍸}}&lt;br /&gt;
| (requires ⎕ prefix)&lt;br /&gt;
| {{Yes}} &amp;lt;small&amp;gt;(first-order functions only)&amp;lt;/small&amp;gt;&lt;br /&gt;
| {{Yes}} &lt;br /&gt;
| {{Yes}} &amp;lt;small&amp;gt;(higher-order functions only)&amp;lt;/small&amp;gt;&lt;br /&gt;
| Higher-order functions precede first-order functions&lt;br /&gt;
| Higher-order functions are left associative, first-order functions are right associative&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}} &amp;lt;small&amp;gt;(alphanumeric only)&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[[B (programming language)|B]]&lt;br /&gt;
|{{code|1=() [] ! ~ ++ -- + - * &amp;amp; / % &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt; &amp;lt;= &amp;gt; &amp;gt;= == != ^ &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; [[?:]] = =+ =- =* =/ =% =&amp;amp; =^ =&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;}}&amp;lt;ref&amp;gt;{{Cite web |title=A TUTORIAL INTRODUCTION TO THE LANGUAGE B |url=https://www.bell-labs.com/usr/dmr/www/btut.html |access-date=2024-08-03 |archive-date=2017-04-03 |archive-url=https://web.archive.org/web/20170403063756/https://www.bell-labs.com/usr/dmr/www/btut.html |url-status=dead }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|{{Yes}}&lt;br /&gt;
|{{Yes}}&lt;br /&gt;
|{{Yes}}&lt;br /&gt;
|{{Yes}}&lt;br /&gt;
|{{Yes}}&lt;br /&gt;
|{{No}}&lt;br /&gt;
|{{No}}&lt;br /&gt;
|{{No}}&lt;br /&gt;
|-&lt;br /&gt;
| [[C (programming language)|C]]&lt;br /&gt;
| {{code|1=() [] -&amp;gt; . ! ~ ++ -- + - * &amp;amp; / % &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt; &amp;lt;= &amp;gt; &amp;gt;= == != ^ &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; &amp;amp;&amp;amp; &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; [[?:]] = += -= *= /= %= &amp;amp;= ^= |= &amp;lt;&amp;lt;= &amp;gt;&amp;gt;=}}&lt;br /&gt;
| &amp;lt;code&amp;gt;[[sizeof]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
|-&lt;br /&gt;
| [[C++]]&lt;br /&gt;
| (same as C)&lt;br /&gt;
| (same as C plus) &amp;lt;code&amp;gt;[[typeid]] [[new (C++)|new]] [[delete (C++)|delete]] [[Exception handling|throw]] [[decltype]] [[static_cast]] [[dynamic cast]] [[reinterpret_cast]] [[const_cast]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
|-&lt;br /&gt;
| [[C sharp (programming language)|C#]]&lt;br /&gt;
| (same as C plus) &amp;lt;code&amp;gt;[[?.]] ?[] [[Null coalescing operator|??]] &amp;lt;nowiki&amp;gt;??=&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;[[sizeof]] nameof new stackalloc await [[Exception handling|throw]] checked unchecked is as delegate default true false&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt; &amp;#039;&amp;#039;&amp;#039;[[LINQ]]:&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;from select where group...by group...by...into join...in...on...equals join...in...on...equals...into orderby orderby...descending&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt; &amp;#039;&amp;#039;&amp;#039;[[Roslyn (compiler)|Roslyn]]-only:&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;__makeref __refvalue __reftype&amp;lt;/code&amp;gt;&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Java (programming language)|Java]]&lt;br /&gt;
| (same as C)&lt;br /&gt;
| &amp;lt;code&amp;gt;[[Java syntax#Instantiation|new]] [[Exception handling|throw]] [[instanceof]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Eiffel (programming language)|Eiffel]]&lt;br /&gt;
| &amp;lt;code&amp;gt;[] + - * / // = /= &amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;not and or implies &amp;quot;and then&amp;quot; &amp;quot;or else&amp;quot; &amp;lt;/code&amp;gt;&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Haskell]]&lt;br /&gt;
|&amp;lt;code&amp;gt;+ - * / ^ ^^ ** == /= &amp;gt; &amp;lt; &amp;gt;= &amp;lt;= &amp;amp;&amp;amp; &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; &amp;gt;&amp;gt;= &amp;gt;&amp;gt; $ $! . ++ !! :&amp;lt;/code&amp;gt; &amp;lt;small&amp;gt;(and many more)&amp;lt;/small&amp;gt;&lt;br /&gt;
| (function name must be in backticks)&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; {{Yes}}, using [[Type class]]es&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[MultiValue|mvBasic Databasic/Unibasic]]&lt;br /&gt;
|&amp;lt;code&amp;gt;+ - * / ^ ** : = ! &amp;amp; [] += -= := # &amp;lt; &amp;gt; &amp;lt;= &amp;gt;= &amp;lt;&amp;gt; &amp;gt;&amp;lt; =&amp;lt; #&amp;gt; =&amp;gt; #&amp;lt; &amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;AND OR NOT EQ NE LT GT LE GE MATCH ADDS() ANDS() CATS() DIVS() EQS() GES() GTS() IFS()&amp;lt;/code&amp;gt;&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Pascal (programming language)|Pascal]]&lt;br /&gt;
| &amp;lt;code&amp;gt;* / + - = &amp;lt; &amp;gt; &amp;lt;&amp;gt; &amp;lt;= &amp;gt;= :=&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;[[Negation#Programming|not]] [[Integer division#Division of integers|div]] [[Modulo operation|mod]] [[Logical conjunction|and]] [[Logical disjunction|or]] in&amp;lt;/code&amp;gt;&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Perl]]&lt;br /&gt;
| &amp;lt;code&amp;gt;-&amp;gt; ++ -- ** ! ~ \ + - . =~ !~ * / % &amp;lt; &amp;gt; &amp;lt;= &amp;gt;= == != &amp;lt;=&amp;gt; ~~ &amp;amp; &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; ^ &amp;amp;amp;&amp;amp;amp; &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; &amp;#039; &amp;amp;apos;&amp;amp;apos; {{Not a typo|// .. ... ?: {{=}} +{{=}} -{{=}} *{{=}} , {{=}}&amp;gt;}} &amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;print sort chmod chdir rand and or not xor lt gt le ge eq ne cmp x &amp;lt;/code&amp;gt;&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
|-&lt;br /&gt;
| [[PHP]]&lt;br /&gt;
| &amp;lt;code&amp;gt;[] ** ++ -- ~  @!&amp;lt;ref&amp;gt;{{Cite web|url=https://php.net/manual/en/language.operators.errorcontrol.php|title=PHP: Error Control Operators - Manual|website=php.net}}&amp;lt;/ref&amp;gt; * / % + - . &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt; &amp;lt;= &amp;gt; &amp;gt;= == != === !== &amp;lt;&amp;gt; [[Spaceship operator|&amp;lt;=&amp;gt;]] &amp;amp; ^ &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; &amp;amp;&amp;amp; &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; [[Null coalescing operator|??]] [[?:]] = += -= *= **= /= .= %= &amp;amp;= &amp;lt;nowiki&amp;gt;|=&amp;lt;/nowiki&amp;gt; ^= &amp;lt;&amp;lt;= &amp;gt;&amp;gt;= &amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;clone new unset print echo isset [[instanceof]] [[Logical conjunction|and]] [[Logical disjunction|or]] [[xor]]&amp;lt;/code&amp;gt;&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
|-&lt;br /&gt;
| [[PL/I]]&lt;br /&gt;
| &amp;lt;code&amp;gt;( ) -&amp;gt; + - * / ** &amp;gt; ¬&amp;gt; &amp;gt;= = ¬= &amp;lt;= &amp;lt; ¬&amp;lt; ¬ &amp;lt;nowiki&amp;gt;&amp;amp;&amp;lt;/nowiki&amp;gt; &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|  &lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Prolog]]&lt;br /&gt;
| &amp;lt;code&amp;gt;:- ?- ; , . =.. = \= &amp;lt; =&amp;lt; &amp;gt;= &amp;gt; == \== - + / *&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;spy nospy not is mod&amp;lt;/code&amp;gt;&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Raku (programming language)|Raku]]&lt;br /&gt;
| &amp;lt;code&amp;gt;++ -- ** ! ~ ~~ * / + - . &amp;lt; &amp;gt; &amp;lt;= &amp;gt;= == != &amp;lt;=&amp;gt; &amp;amp; &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; ^ &amp;amp;amp;&amp;amp;amp; &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; //&amp;lt;/code&amp;gt; &amp;lt;ref&amp;gt;{{Cite web|url=https://docs.perl6.org/language/operators|title=Operators|website=docs.perl6.org}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;print sort chmod chdir rand and or not xor lt gt le ge eq ne leg cmp x xx&amp;lt;/code&amp;gt;&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&amp;lt;ref&amp;gt;{{Cite web|url=https://docs.perl6.org/language/functions#Defining_Operators|title=Functions|website=docs.perl6.org}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Smalltalk]]&lt;br /&gt;
| (up to two characters&amp;lt;ref name=&amp;quot;BinaryMessages&amp;quot;&amp;gt;{{cite book |last1=Goldberg |first1=Adele |last2=Robson |first2=David |title=Smalltalk-80: The Language and its Implementation |url=http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.pdf |date=1983 |page=| publisher=Addison-Wesley |location=Reading, Mass. |isbn=0-201-11371-6}}&amp;lt;/ref&amp;gt;)&lt;br /&gt;
| (alphanumeric symbols need a colon suffix)&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Swift (programming language)|Swift]]&lt;br /&gt;
| (any Unicode symbol string except) &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; (including) &amp;lt;code&amp;gt;! ~ + - * / % =+ =- =* =/ =% &amp;amp;+ &amp;amp;- &amp;amp;* =&amp;amp;+ =&amp;amp;- =&amp;amp;* &amp;amp;&amp;amp; &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;amp; &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; ^ == != &amp;lt; &amp;lt;= &amp;gt; &amp;gt;= ?? ... ..&amp;lt; &amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;is as as?&amp;lt;/code&amp;gt;&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}} &amp;lt;small&amp;gt;(defined as partial order in precedence groups)&amp;lt;/small&amp;gt;&lt;br /&gt;
| {{Yes}} &amp;lt;small&amp;gt;(defined as part of precedence groups)&amp;lt;/small&amp;gt;&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Visual Basic .NET]]&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;() . ! ?() ?. ?! + - * / \ &amp;amp; &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;lt; &amp;lt;= &amp;gt; &amp;gt;= ^ &amp;lt;&amp;gt; = += -= *= /= \= &amp;amp;= ^= &amp;lt;&amp;lt;= &amp;gt;&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;New Await Mod Like Is IsNot Not And AndAlso Or OrElse Xor If(...,...) If(...,...,...) GetXmlNamespace(...) GetType(...) NameOf(...) TypeOf...Is TypeOf...IsNot DirectCast(...,...) TryCast(...,...) &amp;lt;/code&amp;gt; &amp;lt;br&amp;gt; &amp;#039;&amp;#039;&amp;#039;[[LINQ]]:&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;From Aggregate...Into Select Distinct Where {{nowrap|&amp;lt;Order By&amp;gt;...[Ascending&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;Descending]}} Take {{nowrap|&amp;lt;Take While&amp;gt;}} Skip {{nowrap|&amp;lt;Skip While&amp;gt;}} Let Group...By...Into Join...On &amp;lt;Group Join...On...Into&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{Yes}}&lt;br /&gt;
| {{No}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Operators in C and C++]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Operators (programming)| ]]&lt;br /&gt;
[[Category:Programming constructs]]&lt;/div&gt;</summary>
		<author><name>~2025-33335-43</name></author>
	</entry>
</feed>