Content deleted Content added
m Reverting possible vandalism by 202.68.95.169 to version by Raise exception. False positive? Report it. Thanks, ClueBot. (563228) (Bot) |
cleanup |
||
Line 1:
An '''expression''' in a [[programming language]] is a combination of explicit [[value (computer science)|value]]s, [[Constant (programming)|constants]], [[variable (programming)|variable]]s, [[operator (programming)|operator]]s, and [[function (programming)|function]]s that are interpreted
For example, 2+3 is an arithmetic and programming expression which evaluates to 5
In [[C (programming language)|C]] and most C-derived languages, a call to a function with a [[Void type|void]] return type is a valid expression, of type void<ref> [http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf ISO/IEC 9899:1999] section 6.3.2.2, accessed August 31, 2009</ref>. Values of type void cannot be used, so the value of such an expression is always thrown away.
Expressions may or may not have [[Side effect (computer science)|side effect]]s. An expression with side effects does not normally have the property of [[referential transparency (computer science)|referential transparency]]. In many languages (e.g. C++) statements may be ended with a semicolon ';' to turn the expression into an expression [[Statement (programming)|statement]]. This asks the implementation to evaluate the expression for its side-effects only, and disregard the result of the expression{{fact|date = July 2009}}.
|