assign(a,
b)
assign(a
= b)
assign(t)
a
- a name
b
- any expression
t
- a list or set of equations
·
For the cases assign(a,b) and assign(a = b) where a is a name, the
assignment a := b is made and NULL is returned. The arguments to assign are
evaluated. Hence if a is already assigned the name b, then assign(a,2) would
assign b the value 2. Note that b is any valid expression, with one exception:
it cannot be an expression sequence containing more than one element.
·
If the argument is a list or set of equations, then assign is
applied to each equation in the list or set.
·
One use of this function is to apply it to a set of equations
returned by the solve function when it is desired to assign the solution values
to the variables.
> assign(a,2);
a;
> assign(b=99);
assign(c=a);
a,b,c;
> s
:= solve( {x+y=1, 2*x+y=3}, {x,y} );
> assign(s);
x,y;
unassign, :=
Any questions or suggestions should be directed to |