Operator (computer programming): Difference between revisions

Content deleted Content added
Examples: Use consistent formatting (either both should be lists or neither; I picked both)
Operator overloading: Edit to form a coherent paragraph
Line 63:
{{main|Operator overloading}}
 
In some programming languagesConceptually, an operator maycan be ''ad[[Function hocoverloading|overloaded]] polymorphic'',in the same way that is,a havefunction definitionscan for{{endash}} moreacting thandifferently onebased kindon the type of data,input. Some languages provide operators that are inherently overloaded (suchaka as''ad hoc polymorphic''). For example, in [[Java (programming language)|Java]] where the {{code|+}} operator issums used[[number]]s bothor for[[concatenate]]s the[[String addition of numbers and for the concatenation of(computer science)|strings)]]. Such an operator is said to be ''overloaded''. InSome languages that support user-defined operator overloading by the programmer (such as [[C++]]) but have a limited set of operators, operator overloading is often used to define customized uses for operators.
 
In the example {{code|IF ORDER_DATE > "12/31/2011" AND ORDER_DATE < "01/01/2013" THEN CONTINUE ELSE STOP|basic}}, the operators are: {{code|>}} (greater than), {{code|AND}} and {{code|<}} (less than).