create Maxima list from multiple return values of a Lisp function
Subject: create Maxima list from multiple return values of a Lisp function
From: Leo Butler
Date: Thu, 16 Jun 2011 20:28:14 +0000
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