Content deleted Content added
Rescuing 1 sources and tagging 0 as dead. #IABot (v2.0beta15) |
Fixed misnomer. Tags: Mobile edit Mobile web edit |
||
Line 1:
An '''expression''' in a [[programming language]] is a combination of one or more [[Constant (programming)|constants]], [[variable (programming)|variable]]s, [[operator (programming)|operator]]s, and [[function (programming)|function]]s that the programming language interprets (according to its particular [[Order of operations|rules of precedence]] and of association) and computes to produce ("to return", in a [[state (computer science)|stateful]] environment) another value. This process, as for [[mathematical expression]]s, is called evaluation.
In simple settings, the [[return type|resulting value]] is usually one of various [[primitive data type|primitive types]], such as numerical, [[string (computer science)|string]], [[boolean expression|
For example, <code>2+3</code> is an arithmetic and programming expression which evaluates to <code>5</code>. A variable is an expression because it denotes a value in memory, so <code>y+6</code> is an expression. An example of a relational expression is <code>4≠4</code>, which evaluates to <code>false</code>.<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] {{Webarchive|url=https://web.archive.org/web/20150109162605/https://www.cs.drexel.edu/~rweaver/COURSES/ISTC-2/TOPICS/expr.html |date=2015-01-09 }} Accessed July 6, 2009</ref>
|