create Maxima list from multiple return values of a Lisp function



Edwin Woollett <woollett at charter.net> writes:


> gcl:rename_file returns three values.
>
> How can I turn these into a Maxima list?
> -----------------------------
> (%i1) :lisp (rename-file "foo.txt" "bar.txt")
> #pbar.txt
> #pC:/work2/foo.txt
> #pC:/work2/bar.txt

:lisp (defmfun $rename_file (from to) (append '((mlist simp)) (multiple-value-list (rename-file from to))))

(%i1) rename_file("/tmp/foo.txt","/tmp/bar.txt");
(%o1)            [/tmp/bar.txt, /tmp/foo.txt, /tmp/bar.txt]

-- 
Leo Butler                 l_butler at users.sourceforge.net
SDF Public Access UNIX System -   http://sdf.lonestar.org