Information about Expression (programming)

An expression in a programming language is a combination of values, variables, operators, and functions that are interpreted (evaluated) according to the particular rules of precedence and of association for a particular programming language, which computes and then produces (returns, in a stateful environment) another value. The expression is said to evaluate to that value. As in mathematics, the expression is (or can be said to have) its evaluated value; the expression is a representation of that value.

Expressions may or may not have side effects. Normally, an expression with side effects does not have the property of referential transparency.

See also

References

  • Expression in The Free On-line Dictionary of Computing, Editor Denis Howe.
A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. Programming languages, like natural languagess, are defined by syntactic and semantic rules which describe their structure and meaning respectively.
..... Click the link for more information.
In computer science, a value is a sequence of bits that is interpreted according to some data type. It is possible for the same sequence of bits to have different values, depending on the type used to interpret its meaning.
..... Click the link for more information.
variable (IPA pronunciation: [ˈvæɹiəbl]) (sometimes called a pronumeral) is a symbolic representation denoting a quantity or expression.
..... Click the link for more information.
Programming languages generally have a set of operators that are similar to operators in mathematics: they are somehow special functions. In addition to arithmetic operations they often perform boolean operations on truth values and string operations on strings of text.
..... Click the link for more information.
In computer science, a subroutine (function, method, procedure, or subprogram) is a portion of code within a larger program, which performs a specific task and can be relatively independent of the remaining code.
..... Click the link for more information.
In computer science and automata theory, a state is a unique configuration of information in a program or machine. It is a concept that occasionally extends into some forms of systems programming such as lexers and parsers.
..... Click the link for more information.
side effect if it modifies some state in addition to returning a value. For example, a function might modify a global or a static variable, modify one of its arguments, write data to a display or file, or read some data from other side-effecting functions.
..... Click the link for more information.
Referential transparency is a property of parts of computer programs. An expression is said to be referentially transparent if it can be replaced with its value without changing the program (in other words, yielding a program that has the same effects and output on the same input).
..... Click the link for more information.
In computer programming a statement can be thought of as the smallest standalone element of an imperative programming language. A program is formed by a sequence of one or more statements. A statement will have internal components (eg, expressions).
..... Click the link for more information.
A Boolean expression is an expression that results in a Boolean value, that is, TRUE or FALSE. For example, the value for 5 > 3 is TRUE, the value for "An apple is not a fruit" is FALSE.

Boolean expressions are used also in document retrieval.
..... Click the link for more information.
expression must be well-formed. That is, the operators must have the correct number of inputs, in the correct places. The expression 2 + 3 is well formed; the expression * 2 + is not, at least, not in the usual notation of arithmetic.
..... Click the link for more information.
evaluation strategy is a set of (usually deterministic) rules for determining the evaluation of expressions in a programming language. Emphasis is typically placed on functions or operators — an evaluation strategy defines when and in what order the arguments to a function
..... Click the link for more information.


This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.
Herod_Archelaus


page counter