Evaluate

Evaluate [ expr ] causes expr to be evaluated even if it appears as the argument of a function whose attributes specify that it should be held unevaluated.

Details

Examples

open all close all

Basic Examples (1)

Evaluate inside a Hold :

Scope (1)

Evaluate works for arguments of any symbol with attributes HoldAll , HoldFirst , or HoldRest :

Since Attributes is HoldAll , use Evaluate to find the properties of the value of x :

Applications (3)

Unprotect a system symbol to make a definition for it:

Force evaluation of the right-hand side of a delayed definition:

Build a function from an expression:

Properties & Relations (3)

Evaluate does not work inside functions with attribute HoldAllComplete :

Use Unevaluated to temporarily treat a function as if it were HoldAll :

Possible Issues (1)

Evaluate works only on the first level, directly inside a held function:

See Also

Tech Notes

Related Guides

History

Introduced in 1991 (2.0)