accessing first element of lisp function directory
Subject: accessing first element of lisp function directory
From: Edwin Woollett
Date: Tue, 14 Jun 2011 10:32:37 -0700
The output of ?directory(path) is not a list. I am
able to access all of the elements except the first.
How can I access the first element?
In the example below, there are five elements in
myout.
-------------------------------------------------------
Maxima 5.24.0 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
2011-06-14
(%i1) myout : ?directory("c:/line1*w.txt");
(%o1) (#pc:/line10w.txt, #pc:/line1b1w.txt, #pc:/line1b2w.txt,
#pc:/line1bw.txt,
#pc:/line1w.txt)
(%i2) length(myout);
(%o2) 4
(%i3) part (myout,1);
(%o3) #pc:/line1b1w.txt
(%i4) for x in myout do print (x)$
#pc:/line1b1w.txt
#pc:/line1b2w.txt
#pc:/line1bw.txt
#pc:/line1w.txt
--------------------------------
Ted Woollett