Knowledge (XXG)

Operator (computer programming)

Source 📝

339:" operators, either to simplify the language's description or implementation. A circumfix operator consists of two or more parts which enclose its operands. Circumfix operators have the highest precedence, with their contents being evaluated and the resulting value used in the surrounding expression. The most familiar circumfix operator are the parentheses mentioned above, used to indicate which parts of an expression are to be evaluated before others. Another example from physics is the 25: 250:). Most languages support programmer-defined functions, but cannot really claim to support programmer-defined operators, unless they have more than prefix notation and more than a single precedence level. Semantically operators can be seen as special form of function with different calling notation and a limited number of parameters (usually 1 or 2). 591:. Some languages allow new operators to be defined, however, either at compile time or at run time. This may involve meta-programming (specifying the operators in a separate language), or within the language itself. Definition of new operators, particularly runtime definition, often makes correct 2105:
New Await Mod Like Is IsNot Not And AndAlso Or OrElse Xor If(...,...) If(...,...,...) GetXmlNamespace(...) GetType(...) NameOf(...) TypeOf...Is TypeOf...IsNot DirectCast(...,...) TryCast(...,...) CType(...,...) CBool(...) CByte(...) CChar(...) CDate(...) CDec(...) CDbl(...) CInt(...) CLng(...)
586:
Most languages have a built-in set of operators, but do not allow user-defined operators, as this significantly complicates parsing. Many languages only allow operators to be used for built-in types, but others allow existing operators to be used for user-defined types; this is known as
409:
semantics. Further, an assignment may be a statement (no value), or may be an expression (value), with the value itself either an r-value (just a value) or an l-value (able to be assigned to). As another example, the
389:, meaning that the arguments are evaluated in their usual way, then some function is evaluated and the result is returned as a value. However, the semantics can be significantly different. For example, in assignment 660:: e.g. a short-circuiting conjunction (X AND Y) that only evaluates later arguments if earlier ones are not false, in a language with strict call-by-value functions. This behaves instead similarly to if/then/else. 595:
of programs 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
1013:
In the presence of coercions in a language, the programmer must be aware of the specific rules regarding operand types and the operation result type to avoid subtle programming mistakes.
629:
for functions, and called with a syntax different from the language's syntax for calling functions. As a function, "greater than" would generally be named by an identifier, such as
992:
is either a floating or fixed-point number (a number that has a decimal place in it) so the integer is then converted to a floating point or fixed-point number respectively.
2052:! ~ + - * / % =+ =- =* =/ =% &+ &- &* =&+ =&- =&* && || << >> & | ^ == != < <= > >= ?? ... ..< 215:). Languages usually define a set of built-in operators, and in some cases allow users to add new meanings to existing operators or even define completely new operators. 2201:. The arity and precedence of the operator is then part of the phrase syntax of the language, which changes the phrase-level analysis. For example, adding an operator 42: 1946:{} -> ** ! + - * / << >> & >< | = <> > >= < <= <& := +:= -:= *:= /:= <<:= >>:= &:= @:= 1249:+ - × ÷ ⌈ ⌊ * ⍟ | ! ○ ~ ∨ ∧ ⍱ ⍲ < ≤ = ≥ > ≠ . @ ≡ ≢ ⍴ , ⍪ ⍳ ↑ ↓ ? ⍒ ⍋ ⍉ ⌽ ⊖ ∊ ⊥ ⊤ ⍎ ⍕ ⌹ ⊂ ⊃ ∪ ∩ ⍷ ⌷ ∘ → ← / ⌿ \ ⍀ ¨ ⍣ & ⍨ ⌶ ⊆ ⊣ ⊢ ⍠ ⍤ ⌸ ⌺ ⍸ 362:
The semantics of operators particularly depends on value, evaluation strategy, and argument passing mode (such as Boolean short-circuiting). Simply, an
742:, ease compiler optimizations depending on the underlying hardware implementation, or improve performance for speed or size. An example are the set of 2100:() . ! ?() ?. ?! + - * / \ & << >> < <= > >= ^ <> = += -= *= /= \= &= ^= <<= >>= 89: 2205:
requires lexing and tokenizing this character, and the phrase structure (syntax tree) depends on the arity and precedence of this operator.
61: 463:) and then evaluates to that argument as an l-value. This allows a sequence of operators all affecting the original argument, allowing a 437:. In C, for instance, the following statement is legal and well-defined, and depends on the fact that array indexing returns an l-value: 68: 434: 108: 1491:
from select where group...by group...by...into join...in...on...equals join...in...on...equals...into orderby orderby...descending
2426: 612: 2431: 1078:+* ** * / % %* %× - + < <= >= > = /= & -:= +:= *:= /:= %:= %*:= +=: :=: :/=: 75: 1719:-> ++ -- ** ! ~ \ + - . =~ !~ * / % < > <= >= == != <=> ~~ & | ^ && || ' 1450: 544: 460: 223: 145: 46: 1659: 1576: 626: 580: 566: 363: 266: 180: 57: 2041: 886:
operator is used both for the addition of numbers and for the concatenation of strings). Such an operator is said to be
743: 149: 1899: 1531: 879: 600: 247: 227: 1339:() -> . ! ~ ++ -- + - * & / % << >> < <= > >= == != ^ | && || 656:
Common examples that differ semantically (by argument passing mode) are Boolean operations, which frequently feature
1243: 894:) but have a limited set of operators, operator overloading is often used to define customized uses for operators. 347:. Circumfix operators are especially useful to denote operations that involve many or varying numbers of operands. 35: 411: 204: 196: 122: 1767: 1466: 1384: 1333: 1291: 849: 787: 709: 657: 528: 367: 192: 799: 2226: 350:
The specification of a language will specify the syntax the operators it supports, while languages, such as
803: 82: 278: 1762:** ++ -- ~ @! * / % + - . << >> < <= > >= == != === !== <> 2194: 137: 1623:+ - * / ^ ^^ ** == /= > < >= <= && || >>= >> $ $ ! . ++ !! : 344: 2262: 459:
An important use is when a left-associative binary operator modifies its left argument (or produces a
869: 857: 722: 676: 588: 129: 1905:++ -- ** ! ~ ~~ * / + - . < > <= >= == != <=> & | ^ && || // 2165: 1971: 1968: 1785: 1782: 1681: 1678: 739: 618: 231: 2403: 1763: 1542: 1478: 1403: 718: 168: 2348: 354:
that support programmer-defined operators require that the syntax be defined by the programmer.
324:
ternary operator. Prefix and postfix operations can support any desired arity, however, such as
2384: 1297:()  ! ~ ++ -- + - * & / % << >> < <= > >= == != ^ | 2094: 1952: 1495: 807: 731: 406: 160: 844:. Some built-in operators supported by a language have a direct mapping to a small number of 2198: 1961: 1955: 1675: 1672: 1415: 735: 646: 573: 468: 464: 313: 262: 230:. In most languages, functions may be seen as a special form of prefix operator with fixed 2244: 964: 957: 795: 592: 286: 282: 254: 1274:
Higher-order functions are left associative, first-order functions are right associative
962:
Some languages also allow for the operands of an operator to be implicitly converted, or
2106:
CObj(...) CSByte(...) CShort(...) CSng(...) CStr(...) CUInt(...) CULng(...) CUShort(...)
1400: 370:
may be just a value (an r-value), or may be an object allowing assignment (an l-value).
1454: 698: 667: 298: 293:
operator in C, which is ternary. There are prefix unary operators, such as unary minus
258: 2298: 2184:
Conversely a right-associative operator with its right argument, though this is rarer.
998:
follows opposite rules—finding the same expression above, it will convert the integer
2420: 2316: 340: 1412: 845: 622: 555:). Some programming languages restrict operator symbols to special characters like 427: 2334: 1021:
The following table shows the operator features in several programming languages:
2280: 1397: 373:
In simple cases this is identical to usual function calls; for example, addition
1539: 1409: 841: 235: 24: 2404:"Smalltalk-80: The Language and its Implementation, p. 27, ISBN 0-201-11371-6" 1779: 1649: 1545: 1418: 995: 837: 141: 1229:
Infix operators are left associative, prefix operators are right associative
121:
This article is about operators in computer programming. For other uses, see
2366: 2004: 1958: 890:. In languages that support operator overloading by the programmer (such as 336: 320:– indeed, since this is the only common example, it is often referred to as 312:. Infix operations of higher arity require additional symbols, such as the 806:(FMA) and some high-performance software libraries support functions like 1965: 1910:
print sort chmod chdir rand and or not xor lt gt le ge eq ne leg cmp x xx
1669: 1406: 1091:¬ +× ⊥ ↑ ↓ ⌊ ⌈ × ÷ ÷× ÷* □ ≤ ≥ ≠ ∧ ∨ ×:= ÷:= ÷×:= ÷*:= %×:= :≠: 1072: 984:
is converted to the number 3.14 before addition can take place. Further,
558: 477: 332: 1826:( ) -> + - * / ** > ¬> >= = ¬= <= < ¬< ¬ & | || 878:, that is, have definitions for more than one kind of data, (such as in 1617: 552: 274: 16:
Construct associated with a mathematical operation in computer programs
535:), or it may allow the creation of programmer-defined operators (e.g. 433:
Use of l-values as operator operands is particularly notable in unary
1858: 1474: 1394: 1391: 1348: 968:, to suitable data types for the operation to occur. For example, in 791: 536: 351: 1864::- ?- ; , . =.. = \= < =< >= > == \== - + / * 1380: 891: 1940: 1726:
print sort chmod chdir rand and or not xor lt gt le ge eq ne cmp x
1086: 548: 540: 523:
A language may contain a fixed number of built-in operators (e.g.
366:
involving an operator is evaluated in some way, and the resulting
270: 253:
The position of the operator with respect to its operands may be
2110: 1820: 1713: 1485: 969: 596: 2128:
Let Group...By...Into Join...On <Group Join...On...Into>
1788: 1770: 1756: 1462: 1340: 1298: 689: 532: 290: 155:
Common simple examples include arithmetic (e.g. addition with
18: 1773:= += -= *= **= /= .= %= &= |= ^= <<= >>= 617:
Common examples that differ from functions syntactically are
1085:
Alphanumeric equivalents, c.f. next column. Some have non
694:
number = spell_out_numbers ? "forty-two" : 42
836:
A compiler can implement operators and functions with
331:
Occasionally parts of a language may be described as "
2227:"Operator Input Forms—Wolfram Language Documentation" 1271:
Higher-order functions precede first-order functions
2012:
Alphanumeric symbols need a colon after the keyword
641:. Instead, the operation uses the special character 1481:
checked unchecked is as delegate default true false
945: 941: 937: 898: 883: 289:, with a few supporting more operands, such as the 179:in some languages). More involved examples include 49:. Unsourced material may be challenged and removed. 625:", with names often outside the language's set of 414: :: and the element access operator . (as in 1253:Alphanumeric symbols need a ⎕ before the keyword 874:In some programming languages an operator may be 481:library, which allows fluent output, as follows: 1665:* / + - = < > <> <= >= := 2073:(defined as partial order in precedence groups) 1630:The function's name must be put into backticks 234:level and associativity, often with compulsory 827:to boost processing speed or reduce code size. 8: 2116:From Aggregate...Into Select Distinct Where 1006:, then concatenate the two operands to form 2335:"A TUTORIAL INTRODUCTION TO THE LANGUAGE B" 377:is generally equivalent to a function call 304:; and binary operations are infix, such as 1225:(prefix operators always have priority 10) 1023: 1017:Operator features in programming languages 2263:"Prefix, Postfix and Circumfix Operators" 109:Learn how and when to remove this message 860:) may have complicated implementations. 401:(address) is used to store the value of 2349:"PHP: Error Control Operators - Manual" 2218: 2193:Introducing a new operator changes the 2177: 1587:not and or implies "and then" "or else" 1062: 1055: 1050: 297:, and postfix unary operators, such as 2079:(defined as part of precedence groups) 746:(aka augmented assignments) in C/C++: 645:(which is tokenized separately during 430:semantics, and their value is a name. 281:. Most programming languages support 269:involving an operator depends on its 7: 2245:"Maxima 5.42.0 Manual: 7. Operators" 599:, for example, and some dialects of 277:), precedence, and (if applicable), 58:"Operator" computer programming 47:adding citations to reliable sources 2197:of the language, which changes the 571:while others allow also names like 397:is not evaluated, but instead its 14: 2046:Any Unicode symbol string except 1778:clone new unset print echo isset 1030:Nonalphanumeric operator symbols 435:increment and decrement operators 613:Category:Operators (programming) 422:) operate not on values, but on 23: 1343:= += -= *= /= %= &= ^= 663:Less common operators include: 525:+, -, *, <, <=, !, = 34:needs additional citations for 2011: 1629: 1501:__makeref __refvalue __reftype 1252: 1033:Alphanumeric operator symbols 226:operators usually contrast to 136:are constructs defined within 1: 2009:(yes - Up to two characters) 1626:Many more in common libraries 1301:= =+ =- =* =/ =% =& =^ =| 1267:(higher-order functions only) 744:compound assignment operators 637:and called as a function, as 1477:nameof new stackalloc await 1258:(first-order functions only) 140:which behave generally like 2448: 1460:Same as C/C++, along with 1089:equivalents, c.f. below.) 955: 867: 649:), and infix notation, as 610: 471:. A common example is the 316: ?: in C, written as 120: 2098: 1647: 1337: 972:coercion rules lead into 788:digital signal processors 683:and address-of operator: 412:scope resolution operator 381:and less-than comparison 205:scope resolution operator 123:Operator (disambiguation) 1766:& ^ | && || 976:producing the result of 850:central processing units 710:Null coalescing operator 658:short-circuit evaluation 483: 439: 2427:Operators (programming) 265:, and the syntax of an 2432:Programming constructs 2249:maxima.sourceforge.net 1974:digits lpad rpad lpad0 921:"01/01/2013" 909:"12/31/2011" 734:combining two or more 519:User-defined operators 195:access in a record or 2321:seed7.sourceforge.net 2317:"Declare an operator" 2231:reference.wolfram.com 2195:lexical specification 1027:Programming language 956:Further information: 936:, the operators are: 738:into one to simplify 692:or ternary operator: 159:), comparison (e.g. " 138:programming languages 2299:"SWI-Prolog -- op/3" 2054:in standard library 1869:spy nospy not is mod 1081:(All operators have 870:Operator overloading 864:Operator overloading 858:string concatenation 856:'+' used to express 723:three-way comparison 677:Dereference operator 619:relational operators 589:operator overloading 475:operator in the C++ 343:notation of Dirac's 130:computer programming 43:improve this article 2166:Relational operator 2118:<Order By>... 1951:conv varConv parse 1285:(alphanumeric only) 800:multiply–accumulate 621:, e.g. ">" for " 405:– corresponding to 318:a ? b : c 144:, but which differ 2303:www.swi-prolog.org 2126:<Skip While> 2122:<Take While> 1064:Programmer-defined 1057:Programmer-defined 988:is an integer and 876:ad hoc polymorphic 848:commonly found on 804:fused multiply–add 732:Compound operators 719:Spaceship operator 504:"world!" 2402:Goldberg, Adele. 2157: 2156: 2095:Visual Basic .NET 2080: 2074: 1627: 1286: 1268: 1259: 1226: 852:, though others ( 736:atomic operations 492:"Hello" 407:call-by-reference 171:operations (e.g. 119: 118: 111: 93: 2439: 2411: 2410: 2408: 2399: 2393: 2392: 2381: 2375: 2374: 2363: 2357: 2356: 2345: 2339: 2338: 2331: 2325: 2324: 2313: 2307: 2306: 2295: 2289: 2288: 2277: 2271: 2270: 2259: 2253: 2252: 2241: 2235: 2234: 2223: 2206: 2204: 2199:lexical analysis 2191: 2185: 2182: 2129: 2127: 2123: 2119: 2107: 2101: 2078: 2072: 2059: 2053: 2049: 1975: 1947: 1911: 1906: 1870: 1865: 1827: 1791: 1774: 1727: 1722: 1666: 1625: 1624: 1588: 1583: 1502: 1492: 1482: 1470: 1421: 1416:reinterpret_cast 1351: 1344: 1302: 1284: 1266: 1257: 1250: 1224: 1211: 1092: 1079: 1066:operator symbols 1024: 1009: 1005: 1001: 991: 987: 983: 979: 975: 952:Operand coercion 947: 943: 940:(greater than), 939: 935: 934: 931: 928: 925: 922: 919: 916: 913: 910: 907: 904: 901: 885: 838:subroutine calls 825: 796:fused operations 790:provide special 786:Similarly, some 785: 781: 777: 773: 769: 765: 761: 757: 753: 749: 728: 715: 704: 695: 686: 682: 673: 652: 647:lexical analysis 644: 640: 636: 632: 578: 570: 562: 526: 514: 511: 508: 505: 502: 499: 496: 493: 490: 487: 480: 474: 469:method cascading 465:fluent interface 455: 452: 449: 446: 443: 421: 417: 404: 396: 392: 388: 384: 380: 376: 345:bra–ket notation 327: 319: 314:ternary operator 311: 307: 303: 296: 283:binary operators 245: 241: 214: 210: 202: 190: 186: 178: 174: 166: 158: 114: 107: 103: 100: 94: 92: 51: 27: 19: 2447: 2446: 2442: 2441: 2440: 2438: 2437: 2436: 2417: 2416: 2415: 2414: 2406: 2401: 2400: 2396: 2383: 2382: 2378: 2365: 2364: 2360: 2347: 2346: 2342: 2333: 2332: 2328: 2315: 2314: 2310: 2297: 2296: 2292: 2279: 2278: 2274: 2261: 2260: 2256: 2243: 2242: 2238: 2225: 2224: 2220: 2215: 2210: 2209: 2202: 2192: 2188: 2183: 2179: 2174: 2162: 2125: 2121: 2117: 2115: 2108: 2104: 2099: 2057: 2051: 2047: 1950: 1945: 1909: 1904: 1868: 1863: 1825: 1777: 1761: 1725: 1718: 1664: 1622: 1586: 1582:+ - * / // = /= 1581: 1500: 1493: 1490: 1483: 1473: 1461: 1390: 1347: 1338: 1296: 1248: 1096: 1090: 1077: 1067: 1065: 1060: 1058: 1053: 1019: 1007: 1003: 999: 989: 985: 981: 977: 973: 960: 958:Type conversion 954: 932: 929: 926: 923: 920: 917: 914: 911: 908: 905: 902: 899: 897:In the example 872: 866: 834: 808: 783: 779: 775: 771: 767: 763: 759: 755: 751: 747: 726: 713: 702: 693: 684: 680: 671: 650: 642: 638: 634: 630: 615: 609: 593:static analysis 572: 564: 556: 524: 521: 516: 515: 512: 509: 506: 503: 500: 497: 494: 491: 488: 485: 476: 472: 457: 456: 453: 450: 447: 444: 441: 419: 415: 402: 394: 390: 386: 382: 378: 374: 360: 325: 317: 309: 305: 301: 294: 287:unary operators 243: 239: 221: 212: 208: 200: 188: 184: 176: 175:, also written 172: 164: 156: 126: 115: 104: 98: 95: 52: 50: 40: 28: 17: 12: 11: 5: 2445: 2443: 2435: 2434: 2429: 2419: 2418: 2413: 2412: 2394: 2389:docs.perl6.org 2376: 2371:docs.perl6.org 2358: 2340: 2326: 2308: 2290: 2272: 2254: 2236: 2217: 2216: 2214: 2211: 2208: 2207: 2186: 2176: 2175: 2173: 2170: 2169: 2168: 2161: 2158: 2155: 2154: 2151: 2148: 2145: 2142: 2139: 2136: 2133: 2130: 2102: 2097: 2091: 2090: 2087: 2084: 2081: 2075: 2069: 2066: 2063: 2060: 2055: 2044: 2038: 2037: 2034: 2031: 2028: 2025: 2022: 2019: 2016: 2013: 2010: 2007: 2001: 2000: 1997: 1994: 1991: 1988: 1985: 1982: 1979: 1976: 1964:times mult in 1948: 1943: 1937: 1936: 1933: 1930: 1927: 1924: 1921: 1918: 1915: 1912: 1907: 1902: 1896: 1895: 1892: 1889: 1886: 1883: 1880: 1877: 1874: 1871: 1866: 1861: 1855: 1854: 1851: 1848: 1845: 1842: 1839: 1836: 1833: 1830: 1828: 1823: 1817: 1816: 1813: 1810: 1807: 1804: 1801: 1798: 1795: 1792: 1775: 1759: 1753: 1752: 1749: 1746: 1743: 1740: 1737: 1734: 1731: 1728: 1723: 1716: 1710: 1709: 1706: 1703: 1700: 1697: 1694: 1691: 1688: 1685: 1667: 1662: 1656: 1655: 1652: 1646: 1643: 1640: 1637: 1634: 1631: 1628: 1620: 1614: 1613: 1610: 1607: 1604: 1601: 1598: 1595: 1592: 1589: 1584: 1579: 1573: 1572: 1569: 1566: 1563: 1560: 1557: 1554: 1551: 1548: 1537: 1536:Same as C/C++ 1534: 1528: 1527: 1524: 1521: 1518: 1515: 1512: 1509: 1506: 1503: 1471: 1458: 1447: 1446: 1443: 1440: 1437: 1434: 1431: 1428: 1425: 1422: 1388: 1377: 1376: 1373: 1370: 1367: 1364: 1361: 1358: 1355: 1352: 1345: 1336: 1330: 1329: 1326: 1323: 1320: 1317: 1314: 1311: 1308: 1305: 1303: 1294: 1288: 1287: 1281: 1278: 1275: 1272: 1269: 1263: 1260: 1254: 1251: 1246: 1240: 1239: 1236: 1233: 1230: 1227: 1221: 1218: 1215: 1212: 1094: 1075: 1069: 1068: 1063: 1061: 1056: 1054: 1051: 1049: 1048:Associativity 1046: 1043: 1040: 1037: 1034: 1031: 1028: 1018: 1015: 1002:into a string 953: 950: 868:Main article: 865: 862: 833: 830: 829: 828: 729: 716: 707: 706: 705: 699:Elvis operator 687: 674: 668:Comma operator 608: 605: 520: 517: 484: 440: 426:, essentially 359: 356: 299:post-increment 220: 217: 117: 116: 31: 29: 22: 15: 13: 10: 9: 6: 4: 3: 2: 2444: 2433: 2430: 2428: 2425: 2424: 2422: 2405: 2398: 2395: 2390: 2386: 2380: 2377: 2372: 2368: 2362: 2359: 2354: 2350: 2344: 2341: 2336: 2330: 2327: 2322: 2318: 2312: 2309: 2304: 2300: 2294: 2291: 2286: 2285:doc.perl6.org 2282: 2276: 2273: 2268: 2264: 2258: 2255: 2250: 2246: 2240: 2237: 2232: 2228: 2222: 2219: 2212: 2200: 2196: 2190: 2187: 2181: 2178: 2171: 2167: 2164: 2163: 2159: 2152: 2149: 2146: 2143: 2140: 2137: 2134: 2131: 2114: 2112: 2103: 2096: 2093: 2092: 2088: 2085: 2082: 2076: 2070: 2067: 2064: 2061: 2056: 2045: 2043: 2040: 2039: 2035: 2032: 2029: 2026: 2023: 2020: 2017: 2014: 2008: 2006: 2003: 2002: 1998: 1995: 1992: 1989: 1986: 1983: 1980: 1977: 1973: 1970: 1967: 1963: 1960: 1957: 1954: 1949: 1944: 1942: 1939: 1938: 1934: 1931: 1928: 1925: 1922: 1919: 1916: 1913: 1908: 1903: 1901: 1898: 1897: 1893: 1890: 1887: 1884: 1881: 1878: 1875: 1872: 1867: 1862: 1860: 1857: 1856: 1852: 1849: 1846: 1843: 1840: 1837: 1834: 1831: 1829: 1824: 1822: 1819: 1818: 1814: 1811: 1808: 1805: 1802: 1799: 1796: 1793: 1790: 1787: 1784: 1781: 1776: 1772: 1769: 1765: 1760: 1758: 1755: 1754: 1750: 1747: 1744: 1741: 1738: 1735: 1732: 1729: 1724: 1721: 1717: 1715: 1712: 1711: 1707: 1704: 1701: 1698: 1695: 1692: 1689: 1686: 1683: 1680: 1677: 1674: 1671: 1668: 1663: 1661: 1658: 1657: 1653: 1651: 1644: 1641: 1638: 1635: 1632: 1621: 1619: 1616: 1615: 1611: 1608: 1605: 1602: 1599: 1596: 1593: 1590: 1585: 1580: 1578: 1575: 1574: 1570: 1567: 1564: 1561: 1558: 1555: 1552: 1549: 1547: 1544: 1541: 1538: 1535: 1533: 1530: 1529: 1525: 1522: 1519: 1516: 1513: 1510: 1507: 1504: 1499: 1497: 1489: 1487: 1480: 1476: 1472: 1468: 1464: 1459: 1456: 1452: 1449: 1448: 1444: 1441: 1438: 1435: 1432: 1429: 1426: 1423: 1420: 1417: 1414: 1411: 1408: 1405: 1402: 1399: 1396: 1393: 1389: 1386: 1382: 1379: 1378: 1374: 1371: 1368: 1365: 1362: 1359: 1356: 1353: 1350: 1346: 1342: 1335: 1332: 1331: 1327: 1324: 1321: 1318: 1315: 1312: 1309: 1306: 1304: 1300: 1295: 1293: 1290: 1289: 1282: 1279: 1276: 1273: 1270: 1264: 1261: 1255: 1247: 1245: 1242: 1241: 1237: 1234: 1231: 1228: 1222: 1219: 1216: 1213: 1210: 1207: 1204: 1201: 1198: 1195: 1192: 1189: 1186: 1183: 1180: 1177: 1174: 1171: 1168: 1165: 1162: 1159: 1156: 1153: 1150: 1147: 1144: 1141: 1138: 1135: 1132: 1129: 1126: 1123: 1120: 1117: 1114: 1111: 1108: 1105: 1102: 1099: 1095: 1093: 1088: 1084: 1076: 1074: 1071: 1070: 1047: 1044: 1041: 1038: 1035: 1032: 1029: 1026: 1025: 1022: 1016: 1014: 1011: 997: 993: 971: 967: 966: 959: 951: 949: 948:(less than). 895: 893: 889: 881: 877: 871: 863: 861: 859: 855: 851: 847: 843: 839: 831: 826: 824: 820: 816: 812: 805: 802:(MAC/MAD) or 801: 797: 793: 789: 745: 741: 737: 733: 730: 727:x <=> y 724: 720: 717: 711: 708: 700: 697: 696: 691: 688: 678: 675: 669: 666: 665: 664: 661: 659: 654: 648: 628: 624: 620: 614: 606: 604: 602: 598: 594: 590: 584: 582: 577: 576: 569: 568: 561: 560: 554: 550: 546: 542: 538: 534: 530: 518: 498:" " 482: 479: 470: 467:, similar to 466: 462: 438: 436: 431: 429: 425: 413: 408: 400: 371: 369: 365: 357: 355: 353: 348: 346: 342: 341:inner product 338: 334: 329: 323: 315: 300: 292: 288: 284: 280: 279:associativity 276: 272: 268: 264: 260: 256: 251: 249: 237: 233: 229: 225: 224:Syntactically 218: 216: 206: 198: 194: 182: 170: 162: 153: 151: 147: 146:syntactically 143: 139: 135: 131: 124: 113: 110: 102: 91: 88: 84: 81: 77: 74: 70: 67: 63: 60: –  59: 55: 54:Find sources: 48: 44: 38: 37: 32:This article 30: 26: 21: 20: 2397: 2388: 2379: 2370: 2361: 2352: 2343: 2329: 2320: 2311: 2302: 2293: 2284: 2275: 2266: 2257: 2248: 2239: 2230: 2221: 2189: 2180: 2109: 2050:, including 1720: 1650:Type classes 1494: 1484: 1413:dynamic cast 1208: 1205: 1202: 1199: 1196: 1193: 1190: 1187: 1184: 1181: 1178: 1175: 1172: 1169: 1166: 1163: 1160: 1157: 1154: 1151: 1148: 1145: 1142: 1139: 1136: 1133: 1130: 1127: 1124: 1121: 1118: 1115: 1112: 1109: 1106: 1103: 1100: 1097: 1082: 1080: 1020: 1012: 994: 963: 961: 896: 887: 875: 873: 853: 846:instructions 835: 822: 818: 814: 810: 662: 655: 635:greater_than 623:greater than 616: 585: 574: 565: 557: 522: 458: 432: 428:call-by-name 423: 398: 372: 361: 349: 330: 321: 252: 222: 161:greater than 154: 150:semantically 133: 127: 105: 99:January 2019 96: 86: 79: 72: 65: 53: 41:Please help 36:verification 33: 2385:"Functions" 2367:"Operators" 2281:"Operators" 2267:mythryl.org 1648:Yes, using 1410:static_cast 1059:overloading 1052:Overloading 1045:Precedence 980:. The text 974:12 + "3.14" 842:inline code 832:Compilation 740:expressions 714:x ?? y 703:x ?: y 627:identifiers 461:side effect 393:the target 273:(number of 236:parentheses 203:), and the 2421:Categories 2213:References 1780:instanceof 1546:instanceof 1419:const_cast 996:JavaScript 915:ORDER_DATE 903:ORDER_DATE 888:overloaded 882:where the 611:See also: 527:, etc. in 364:expression 285:and a few 267:expression 232:precedence 181:assignment 177:&& 69:newspapers 2058:is as as? 2005:Smalltalk 1764:<=> 1469: ??= 772:>>= 768:<<= 529:C and C++ 379:add(x, y) 358:Semantics 337:circumfix 326:1 2 3 4 + 228:functions 199:(usually 183:(usually 142:functions 134:operators 2160:See also 1962:mdiv mod 1465: ? 1407:decltype 1073:ALGOL 68 1042:Postfix 1008:"123.14" 927:CONTINUE 840:or with 651:x > y 639:gt(x, y) 607:Examples 507:<< 501:<< 495:<< 489:<< 478:iostream 473:<< 416:Foo::Bar 399:location 387:lt(x, y) 383:x < y 333:matchfix 275:operands 244:(Func a) 2353:php.net 1618:Haskell 1191:timesab 1185:minusab 1128:shorten 1036:Prefix 965:coerced 792:opcodes 553:Haskell 263:postfix 240:Func(a) 207:(often 169:logical 167:), and 163:" with 83:scholar 1859:Prolog 1660:Pascal 1577:Eiffel 1498:-only: 1496:Roslyn 1475:sizeof 1401:delete 1395:typeid 1392:sizeof 1349:sizeof 1203:plusto 1197:overab 1188:plusab 1110:entier 1039:Infix 982:"3.14" 813:= cos 776:&= 685:&x 581:Pascal 579:(e.g. 537:Prolog 352:Prolog 335:" or " 255:prefix 219:Syntax 197:object 85:  78:  71:  64:  56:  2407:(PDF) 2172:Notes 2124:Skip 2120:Take 2042:Swift 1941:Seed7 1543:throw 1479:throw 1404:throw 1200:modab 1194:divab 1125:round 1116:level 1087:ASCII 978:15.14 798:like 721:(for 549:OCaml 541:Seed7 424:names 391:a = b 375:x + y 368:value 310:x = y 306:x + y 271:arity 259:infix 238:e.g. 193:field 90:JSTOR 76:books 2150:Yes 2147:Yes 2144:Yes 2141:Yes 2138:Yes 2135:Yes 2132:Yes 2111:LINQ 2089:Yes 2086:Yes 2083:Yes 2077:Yes 2071:Yes 2068:Yes 2065:Yes 2062:Yes 2036:Yes 2033:Yes 2030:Yes 2021:Yes 2018:Yes 1999:Yes 1996:Yes 1993:Yes 1990:Yes 1987:Yes 1984:Yes 1981:Yes 1978:Yes 1953:conj 1935:Yes 1932:Yes 1929:Yes 1926:Yes 1923:Yes 1920:Yes 1917:Yes 1914:Yes 1900:Raku 1894:Yes 1885:Yes 1882:Yes 1879:Yes 1876:Yes 1873:Yes 1844:Yes 1841:Yes 1835:Yes 1832:Yes 1821:PL/I 1806:Yes 1803:Yes 1800:Yes 1797:Yes 1794:Yes 1748:Yes 1745:Yes 1742:Yes 1739:Yes 1736:Yes 1733:Yes 1730:Yes 1714:Perl 1702:Yes 1699:Yes 1696:Yes 1690:Yes 1687:Yes 1654:Yes 1645:Yes 1642:Yes 1636:Yes 1633:Yes 1612:Yes 1609:Yes 1603:Yes 1600:Yes 1594:Yes 1591:Yes 1565:Yes 1562:Yes 1559:Yes 1556:Yes 1553:Yes 1550:Yes 1532:Java 1523:Yes 1520:Yes 1517:Yes 1514:Yes 1511:Yes 1508:Yes 1505:Yes 1486:LINQ 1455:more 1442:Yes 1439:Yes 1436:Yes 1433:Yes 1430:Yes 1427:Yes 1424:Yes 1385:more 1369:Yes 1366:Yes 1363:Yes 1360:Yes 1357:Yes 1354:Yes 1319:Yes 1316:Yes 1313:Yes 1310:Yes 1307:Yes 1283:Yes 1280:Yes 1277:Yes 1265:Yes 1262:Yes 1256:Yes 1238:Yes 1235:Yes 1232:Yes 1223:Yes 1217:Yes 1214:Yes 1209:isnt 1182:elem 1176:over 1143:down 1122:repr 1113:leng 1083:bold 1004:"12" 990:3.14 970:Perl 946:< 944:and 938:> 933:STOP 930:ELSE 924:THEN 918:< 906:> 880:Java 854:e.g. 821:sin 809:cis 794:for 672:e, f 643:> 601:Lisp 597:Perl 510:endl 486:cout 248:Lisp 242:(or 165:> 62:news 2153:No 2027:No 2024:No 2015:No 1969:and 1966:not 1959:rem 1956:div 1891:No 1888:No 1853:No 1850:No 1847:No 1838:No 1815:No 1812:No 1809:No 1789:xor 1783:and 1757:PHP 1751:No 1708:No 1705:No 1693:No 1684:in 1679:and 1676:mod 1673:div 1670:not 1639:No 1606:No 1597:No 1571:No 1568:No 1540:new 1526:No 1445:No 1398:new 1381:C++ 1375:No 1372:No 1328:No 1325:No 1322:No 1244:APL 1220:No 1179:mod 1170:and 1149:upb 1146:lwb 1137:shr 1134:shl 1119:odd 1107:bin 1104:arg 1101:abs 1098:not 942:AND 912:AND 892:C++ 725:): 633:or 583:). 575:div 563:or 533:PHP 420:a.b 418:or 385:to 322:the 308:or 302:x++ 261:or 246:in 211:or 191:), 187:or 173:AND 152:. 148:or 128:In 45:by 2423:: 2387:. 2369:. 2351:. 2319:. 2301:. 2283:. 2265:. 2247:. 2229:. 1972:or 1786:or 1771:?: 1768:?? 1682:or 1467:?? 1463:?. 1457:) 1451:C# 1387:) 1341:?: 1299:?: 1206:is 1173:or 1167:ne 1164:eq 1161:gt 1158:ge 1155:le 1152:lt 1140:up 1010:. 1000:12 986:12 900:IF 817:+ 784:|= 782:, 780:^= 778:, 774:, 770:, 766:, 764:%= 762:, 760:/= 758:, 756:*= 754:, 752:-= 750:, 748:+= 712:: 701:: 690:?: 681:*p 679:: 670:: 653:. 631:gt 603:. 567::= 551:, 547:, 545:F# 543:, 539:, 531:, 448:++ 328:. 295:-x 291:?: 257:, 209::: 189::= 132:, 2409:. 2391:. 2373:. 2355:. 2337:. 2323:. 2305:. 2287:. 2269:. 2251:. 2233:. 2203:@ 2113:: 2048:. 1488:: 1453:( 1383:( 1334:C 1292:B 1131:i 884:+ 823:x 819:i 815:x 811:x 559:+ 513:; 454:; 451:a 445:= 442:x 403:b 395:a 213:. 201:. 185:= 157:+ 125:. 112:) 106:( 101:) 97:( 87:· 80:· 73:· 66:· 39:.

Index


verification
improve this article
adding citations to reliable sources
"Operator" computer programming
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message
Operator (disambiguation)
computer programming
programming languages
functions
syntactically
semantically
greater than
logical
assignment
field
object
scope resolution operator
Syntactically
functions
precedence
parentheses
Lisp
prefix
infix

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.