
alias - define an abbreviation or macro

Calling sequence:

alias(ident = expr ...)
alias(call = expr ...)

Parameter:
ident   --  identifier
call    --  function call
expr    --  expression

Summary:

alias defines an abbreviation (or macro). Such an abbreviation is expanded
into its original definition after text is read but before any evaluation takes
place. This applies to any text read by the MuPAD parser, wether entered
interactively or via the funtions read or finput.

The abbreviation may be an identifier or a function call:

alias(a = b) defines an abbreviation for the expression b. Every time a is
    read it is replaced by b.

alias(f(x1,...,xn) = b) defines an abbreviation for b depending upon
    parameters.  Every time a function call of the form f(y1,...,yn) is

     read this function call is replaced by subs(b, x1=y1,...,xn=yn), i.e.
     the \formal parameters" xi in b are replaced by the \actual parameters"
     yi.

Multiple alias definitions may be given in a single call.  The arguments of
alias are not evaluated.

Note that an alias definition remains valid during a call of the system functions
read and finput. This may cause unwanted side-effects. During the evaluation
of an element of the loadproc-domain the actual alias definitions are un-
defined in order to avoid such side-effects.  Use unalias to delete alias
definitions.

One may not re-define keywords of the MuPAD language with an alias
definition. The abbreviations must be valid expressions.

>>  alias(d = diff): d(f(x,y), x);

      D([1], f)(x, y)

>>  alias(Dx(f) = diff(f(x),x)): Dx(f+g);

      diff(f(x), x) + diff(g(x), x)

See also:  finput , loadproc , read, unalias

