eval
Function in a programming language, which evaluates a string as though it were an expression and returns a result
- Instance of
Overview
On other databases
4 identifiers linking eval across the web's reference databases
Function in a programming language, which evaluates a string as though it were an expression and returns a result
4 identifiers linking eval across the web's reference databases
From Wikipedia, the free encyclopedia · Read full article · Text CC BY-SA 4.0
In some programming languages, eval, short for evaluate, is a function which evaluates a string as though it were an expression in the language, and returns a result; in others, it executes multiple lines of code as though they had been included instead of the line including the eval. The input to eval is not necessarily a string; it may be structured representation of code, such as an abstract syntax tree, or of special type such as code. The analog for a statement is exec, which executes a string as if it were a statement; in some languages, such as Python, both are present, while in other languages only one of either eval or exec is.