Expression (computer science): Difference between revisions

Content deleted Content added
No edit summary
ClueBot (talk | contribs)
m Reverting possible vandalism by 202.68.95.169 to version by Raise exception. False positive? Report it. Thanks, ClueBot. (563228) (Bot)
Line 1:
An '''LOLexpression''' in a [[programming language]] is a combination of [[value (computer science)|value]]s, [[variable (programming)|variable]]s, [[operator (programming)|operator]]s, and [[function (programming)|function]]s that are interpreted (''[[Evaluation (disambiguation)|evaluated]]'') according to the particular [[Order of operations|rules of precedence]] and of association for a particular programming language, which computes and then produces (''returns'', in a [[state (computer science)|stateful]] environment) another value. The expression is said to ''evaluate to'' that value{{Fact|date = July 2009}}.
 
For example 2+3 is an arithmetic and programming expression which evaluates to 5. The assignment expression x=2+3 also evaluates to 5 and is a programming expression, but is an equation in mathematics and not a [[mathematical expression]]. A variable is an expression because it is a pointer to a value in memory, so y+6 is an expression. An example of a programming relational expression would be 4==4 which evaluates to true.<ref> [https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Expressions Javascript expressions, Mozilla]Accessed July 6, 2009</ref><ref> [https://www.cs.drexel.edu/~rweaver/COURSES/ISTC-2/TOPICS/expr.html Programming in C]Accessed July 6, 2009</ref>