evaln - Maple Help

evaln

evaluate to a name

 Calling Sequence evaln(expr)

Parameters

 expr - expression

Description

 • The evaln function is used to "evaluate to a name" or, more generally, to form an assignable object. The name (assignable object) will not itself be evaluated.
 • A typical example of its use would be divide(a,b,evaln(t[i])) where i is the index of a for loop.
 • If the expression is a simple name (i.e. a symbol) then the same effect can be achieved by using single quotes on the name.
 • evaln can be used on names, subscripts, function calls, and concatenations.
 • There is also a procedure parameter modifier, evaln, which declares that an argument to a procedure invocation must evaluate to a name.

 • The evaln command is thread-safe as of Maple 15.

Examples

 > $i≔1$
 ${i}{≔}{1}$ (1)
 > $\mathrm{evaln}\left(i\right)$
 ${i}$ (2)
 > $\mathrm{evaln}\left(a‖i\right)$
 ${\mathrm{a1}}$ (3)
 > $\mathrm{evaln}\left(a‖\left(1..3\right)\right)$
 ${\mathrm{a1}}{,}{\mathrm{a2}}{,}{\mathrm{a3}}$ (4)
 > $\mathrm{evaln}\left(t\left[i\right]\right)$
 ${{t}}_{{1}}$ (5)
 > $\mathrm{evaln}\left(f\left(i\right)\right)$
 ${f}{}\left({1}\right)$ (6)
 > $\mathrm{divide}\left({x}^{2},x,\mathrm{evaln}\left(t\left[i\right]\right)\right)$
 ${\mathrm{true}}$ (7)
 > $t\left[i\right]$
 ${x}$ (8)

If something which does not evaluate to a name is passed to evaln an error is returned

 > $\mathrm{evaln}\left(3\right)$