[Maxima] array arguments to function
robert.dodier at gmail.com
Wed Jan 30 21:24:53 CST 2008
On 1/30/08, Thomas Widlar <twidlar at yahoo.com> wrote:
> I'm not sure I understand the answer. Is it possible
> to pass arrays, lists or matrices to a function and
> have the function modify the actual array, list or matrix?
Yes. If the argument is a list, a matrix, or an array created
by make_array, then the actual argument is modified by
functions which modify the formal argument. There are
other special cases which I won't try to enumerate now.
> In other words, are arrays, lists or matrices passed
> by value, reference or both?
It turns out the problem has more to do with Maxima's
evaluation policy and the implementation of arrays.
The treatment of arrays is a mess. I hope we can clean
it up eventually.
More information about the Maxima