Page 1 of 1
select "segmentation fault"
Posted: Wed Nov 01, 2006 11:22 am
by newdep
Hi Lutz,
Should this happen?
Perhpas its just a little too nested?
newLISP v.9.0 on Linux, execute 'newlisp -h' for more info.
> (select D (index true? (map directory? (setq D (directory)))))
Segmentation fault
Norman.
Posted: Wed Nov 01, 2006 11:25 am
by newdep
just an addon...
The above was on my path by creating the smalest directory selection from a bunch of files.. So if the above doesn't work then i guess this is
the smallest a "directory filter" can get in newlisp ->
(and (setq X (index true? (map directory? (setq D (directory))))) (select D X))
Norman.
Posted: Wed Nov 01, 2006 12:59 pm
by Lutz
The first definition crashes because D is modified by 'setq' while beeing used by 'select'.
Also using 'select' with an index list constructed using 'index' is the same as using 'filter', so why not just doing?
or if you want all files not a directory:
Lutz
Posted: Thu Nov 02, 2006 9:00 pm
by newdep
yes right I was a little overclocking the function ;-)
But 'clean? actualy how long does that one exist already? I never
seen it befor ;-) Great way to wake up again ;-)
Norman.
Posted: Mon Nov 06, 2006 2:47 am
by lisp
It was put in @ v.8.8.7 according to the
8.9 release notes.
Posted: Tue Nov 14, 2006 10:41 pm
by newdep
Aaa im always running behind the mind expantion of Lutz...