uneval - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Unevaluated Expressions, 'expr'

 

Description

Examples

Description

• 

Enclosing an expression with right single quotes ' ' will delay the evaluation of the expression.

• 

As another example, help(Digits); returns a message stating that the argument to the help function was not a name --- because Digits evaluates to an integer value. To get the desired help description, use instead the quoted form: help('Digits');.

• 

Enclosing an expression in unevaluation quotes produces a new expression of type uneval. It evaluates to the original expression.

• 

After each evaluation, one level of single quotes is stripped off.

• 

Note that evaluation is different from simplification.

• 

A special case of unevaluation is used to unassign a name. In some cases, the evaln function is required to unassign a name, such as: for⁢i⁢to⁢n⁢do⁢⁢ai:=evaln⁡ai⁢end⁢do; where i must be evaluated but ai must not be fully evaluated.

• 

It is important to quote name arguments passed to procedures, such as type names, or options to other procedures.

• 

There is also a procedure parameter modifier, uneval, which declares that an argument to a procedure is automatically left unevaluated.

Examples

> 

x≔2:

> 

y≔3:

> 

f≔x+y

f≔x+y

(1)
> 

5

(2)

After each evaluation, one level of single quotes is stripped off.

> 

a≔1

a≔1

(3)
> 

a

a

(4)
> 

a

a

(5)
> 

a

1

(6)
> 

2

2

(7)

Name arguments passed to procedures must be in quotes.

> 

dependent≔2:

> 

type⁡s,dependent⁡s,t

true

(8)
> 

type⁡s,dependent⁡s,t

false

(9)

A special case of unevaluation is used to unassign a name.

> 

x≔5

x≔5

(10)
> 

x≔x

x≔x

(11)
> 

x

x

(12)

See Also

assignment

evaln

spec_eval_rules

The uneval Modifier

type/uneval