WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

Hold [expr]

maintains expr in an unevaluated form.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Applications  
Properties & Relations  
See Also
Tech Notes
Related Guides
Related Workflows
Related Links
History
Cite this Page

Hold [expr]

maintains expr in an unevaluated form.

Details

  • Hold allows you to use an expression that has not undergone normal evaluation.
  • Hold has attribute HoldAll and performs no operation on its arguments.
  • Hold is removed by ReleaseHold . »
  • Hold [e1,e2,] maintains a sequence of unevaluated expressions to which a function can be applied using Apply .
  • Hold can be inserted as a wrapper by such functions as ToExpression and Extract . »
  • Even though expr itself is not evaluated, Hold [expr] may still evaluate if expr is of the form f[args], and upvalues for f have been defined. »

Examples

open all close all

Basic Examples  (1)

Hold an expression to prevent evaluation:

Release the hold:

Scope  (1)

Extract a part without allowing it to evaluate:

Applications  (2)

Find the length of each expression in a held list without evaluation:

Evaluate every sum (only) inside a held expression:

Properties & Relations  (10)

Hold is a container with the attribute HoldAll :

Use Evaluate to force evaluation of an argument of Hold :

Unevaluated inside a held expression is not removed:

Sequence splicing still happens inside Hold :

Use the container HoldComplete to suppress even such transformations:

Upvalues work inside Hold :

They do not work inside HoldComplete :

Substitution works inside Hold :

Insert into a held expression:

ReleaseHold removes one level of Hold :

HoldForm is like Hold but is normally not shown in the output:

Hold can be used to freeze the result of ToExpression before it is evaluated:

History

Introduced in 1988 (1.0)

Wolfram Research (1988), Hold, Wolfram Language function, https://reference.wolfram.com/language/ref/Hold.html.

Text

Wolfram Research (1988), Hold, Wolfram Language function, https://reference.wolfram.com/language/ref/Hold.html.

CMS

Wolfram Language. 1988. "Hold." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Hold.html.

APA

Wolfram Language. (1988). Hold. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Hold.html

BibTeX

@misc{reference.wolfram_2025_hold, author="Wolfram Research", title="{Hold}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/Hold.html}", note=[Accessed: 05-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_hold, organization={Wolfram Research}, title={Hold}, year={1988}, url={https://reference.wolfram.com/language/ref/Hold.html}, note=[Accessed: 05-December-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /