define (basic)



On 16-12-2013 13:35, Ricardo JF wrote:
> Hi friends,
>
> why x[m] doesn't change to m^3
>
> ........
> y=m^2;
> define (x[m],rhs(%));        x[m];
> z=m^3;
> define (x[m],rhs(%));        x[m];
> ........
> why x[m]=m^2 ?
>
It does change fine for me:

(%i2) y=m^2$
(%i3) define (x[m],rhs(%));
(%o3) x[m]:=m^2
(%i4) z=m^3$
(%i5) define (x[m],rhs(%));
(%o5) x[m]:=m^3
(%i6) x[6];
(%o6) 216

Regards,
Jaime