Difference between revisions of "Operator"

From Computer History Wiki
Jump to: navigation, search
(A decent start)
 
m (Better word)
Line 1: Line 1:
In [[programming language]]s, an '''operator''' is an transaction which works on one or two (usually) data values(s) in some way to produce another value, which is then used in some way - perhaps as part of a larger [[expression]] in the [[program]].
+
In [[programming language]]s, an '''operator''' is an action which works on one or two (usually) data values(s) in some way, to produce another value, which is then used in some way - perhaps as part of a larger [[expression]] in the [[program]].
  
 
Operators which take a single data item are sometimes called 'unary', and those which take two can be called 'binary'.
 
Operators which take a single data item are sometimes called 'unary', and those which take two can be called 'binary'.

Revision as of 19:19, 29 August 2018

In programming languages, an operator is an action which works on one or two (usually) data values(s) in some way, to produce another value, which is then used in some way - perhaps as part of a larger expression in the program.

Operators which take a single data item are sometimes called 'unary', and those which take two can be called 'binary'.

An example of unary operator would be a bit-wise inversion, and binary operators include the usual arithmetic operations +, /, etc.