Operator: Difference between revisions
From Computer History Wiki
Jump to navigationJump to search
m Better word |
add link |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
In [[programming language]]s, an '''operator''' is | ''The term '''operator'' is sometimes used to refer to a [[computer operator]].'' | ||
In [[programming language]]s, an '''operator''' is a directive which works on one or two (usually) data values(s), the [[operand]]s, in some way; thereby producing 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'. | ||
| Line 5: | Line 7: | ||
An example of unary operator would be a bit-wise inversion, and binary operators include the usual arithmetic operations ''+'', ''/'', etc. | An example of unary operator would be a bit-wise inversion, and binary operators include the usual arithmetic operations ''+'', ''/'', etc. | ||
{{stub}} | {{semi-stub}} | ||
[[Category: Basics]] | |||
Latest revision as of 13:47, 24 December 2018
The term 'operator is sometimes used to refer to a computer operator.
In programming languages, an operator is a directive which works on one or two (usually) data values(s), the operands, in some way; thereby producing 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.