Another hour, another possible problem. Consider the following Maple statements:

> f := table([index=m]);
f := table([index = m])
> g := copy(eval(f));
g := table([index = m])
> g[index] := one;
g[index] := one
> h := g;
h := g
> f[index], h[index];
m, one
> g := copy(eval(h));
g := table([index = one])
> g[index] := two;
g[index] := two
> l := g;
l := g
> f[index], h[index], l[index];
m, two, two

So, after the first copy, the second table h has value one for index, while f still has value m for index. Yet, after the second copy, not only the third table l has value two for index, but also the second table h now has value two for index, while I have explicitly used copy to make a copy of h. Does this indicate a problem with the copy function?

-- Regards,

Franky.

Please Wait...