Skip to main content
eval

eval

1 9.4
A function that runs text as code while a program is running
  • noun
  • /ˈiːvæl/
  • Specialized
translation icon : eval
  • The function eval takes two arguments: expr, the expression to be evaluated; and eval base, a function for evaluating base predicates.
  • eval function

Examples

  • The code is generic in the sense that eval could be used for expressions over any type of base predicate, but eval base must be provided in order to evaluate the truth or falsehood of those base predicates.

    Academic text (2011)
  • In the old Ruby version, it was possible to create a local variable using eval.

    Blog text (6)
  • And it's even standardized that eval cannot create a local variable since it is executed in its own execution context.

    Blog text (6)
  • Under Ruby 1.9, each eval call gets its own scope, and the set of variables is determined once at parse time.

    Blog text (6)
  • In programming, the eval function executes a string as code at runtime, allowing for dynamic programming.

  • Many developers advise against using eval due to potential security risks when executing untrusted code.

  • The eval command is particularly useful in debugging, as it can evaluate expressions directly in the console.

Synonyms

evaluator
vseval
  • Specialized
1 6.0

A part of a program that reads code or data and gives a result

focuses on running code strings as executable code during program runtime

Antonyms

1.0

Choose not to pay attention to someone or something

119 3.9

Ignore something or someone on purpose

Surface Forms

eval singular
evals plural

Etymology

Eval comes from the computer and math word evaluate, which means 'to find the value' or 'work out' something. In programming, eval is the short name for a function that 'finds the value' of a piece of code by running it at runtime.