Unary: Difference between revisions
Appearance
Content deleted Content added
Jacob grace (talk | contribs) No edit summary |
Jacob grace (talk | contribs) m Add link of 'address' |
||
Line 11: | Line 11: | ||
:Increment: ++<font color=gray>x</font>, <font color=gray>x</font>++ |
:Increment: ++<font color=gray>x</font>, <font color=gray>x</font>++ |
||
:Decrement: --<font color=gray>x</font>, <font color=gray>x</font>-- |
:Decrement: --<font color=gray>x</font>, <font color=gray>x</font>-- |
||
:Address: &<font color=gray>x</font> |
:[[Reference (computer science)|Address]]: &<font color=gray>x</font> |
||
:[[Indirection]]: *<font color=gray>x</font> |
:[[Indirection]]: *<font color=gray>x</font> |
||
:Positive: +<font color=gray>x</font> |
:Positive: +<font color=gray>x</font> |
Revision as of 07:54, 24 May 2005
Unary may mean number system or operator:
Operator: A kind of operator that has only one operand. Some examples of unary operators are listed below:
- Math:
- Factorial: n!
- Programming language: (Notations listed below are C style.)
- Increment: ++x, x++
- Decrement: --x, x--
- Address: &x
- Indirection: *x
- Positive: +x
- Negative: -x
- One's complement: ~x
- Logical negation: !x
- Sizeof: sizeof(x)
- Cast: (type-name) cast-expression
See also: Arity, Operand, Operator, Unary operation, Operator (programming)
Referrence: K. & R. <<The C Programming Language>>, 2nd ed., p. 203ff.