A compiled program, or an interpreter running some code, is said to evaluate the expressions it comes across. Once the instruction has been parsed and the expressions figured out, it's time to calculate their value. Thus, "a+5" might evaluate to 6.7 (if a == 1.7), and "len('a'*5)" to 5 (in Python, the expression 'a'*5 evaluates to 'aaaaa', and len is a function returning objects' lengths). In many interpreted languages, the interpreter's own evaluation command is available to the programmer (or one very much like it); expressions are passed as strings, and the value is returned. This function is frequently named eval.

Interpreters are also sometimes said loosely to "evaluate" code (entire instructions, rather than just expressions), but strictly speaking, this is execution (of which expression evaluation is just one part).

E*val"u*ate (?), v. t. [See Evaluation.]

To fix the value of; to rate; to appraise.

 

© Webster 1913.

Log in or registerto write something here or to contact authors.