Unevaluated

When Unevaluated[expr] is an argument of a function (expr) is given to the

function it is an argument of without evaluating. Consider the example in

the next cell. If it were not for the use of Unevaluated the sum would

evaluate to 30 which has the head Integer. Instead the head Plus is

returned.

Often times when we make a function with a holding attribute (e.g. HoldAll,

HoldRest, HoldFirst) we have to use Unevaluated in the definition of the

function. Consider the function in the next cell that converts it's argument

to a string before the string can evaluate.

Here the HoldAll attribute prevents MakeString from evaluating it's argument.

However, we also need to use Unevaluated to ensure ToString doesn't evaluate

it's argument.

The next cell demonstrates the MakeString function. We see that (mass) is

converted to a string even though the symbol has a numeric value assigned to

it.

For more understanding of Unevaluated see examples in my explanation of the Mathematica evaluation process.

Created by Mathematica (May 16, 2004)