Unevaluated
Usage Message: Unevaluated[expr] represents the unevaluated form of expr when it appears as the argument to a function. Attributes[Unevaluated] = {HoldAllComplete, Protected} Related Symbols: Evaluate
Hold
HoldAll
HoldFirst
HoldRest
HoldAll
ReleaseHold
Notes: Unevaluated is used to hold an element in an expression unevaluated. It is useful primarily for holding function arguments unevaluated until they are passed along to the definition of the function. For example:
In[1]:= f[p_] := Hold[p]
In[2]:= f[2 + 2]
Out[2]= Hold[4]
In[3]:= f[Unevaluated[2 + 2]]
Out[3]= Hold[2 + 2]
A similar effect is often achieved using attributes. For example:
In[4]:= SetAttributes[f, HoldAll]
In[5]:= f[2 + 2]
Out[5]= Hold[2 + 2]
Additional Online Documentation:
Mathematica 3.0
http://documents.wolfram.com/v3/RefGuide/Unevaluated.html
Mathematica 4.0
http://documents.wolfram.com/v4/RefGuide/Unevaluated.html
Questions or comments? Send email to support@wolfram.com.
|