expression 表达式

4:06:00 PM 0 Comments

Expression (programming)

From Wikipedia, the free encyclopedia

Jump to: navigation, search

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 math, the expression is (or can be said to have) its evaluated value; the expression is a representation of that value. So, in mathematics, an expression is a representation of a value.

Expressions may or may not have side effects. An expression with side effects does not normally have the property of referential transparency.

[edit] See also

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard.