Hi Luis,

> 1) how to print a blank line?

You can call 'prinl' without arguments:

   (prinl)


> a list with the subdir components of some dir, but (ffiles (cdr
> (append Dir_list (GetFullPath Item (dir Item))))) ) [line 39]  does
> not seem to get that list back.  When I run it, it only seems to get a
> list of one file only, even if there's a a sub-directory there.

Hmm, this unnecessarily complex. Why don't you use a simple 'for' loop
or mapping function, instead of the recursion?

Also, debugging is a lot easier if you simply call (trace 'ffiles)
instead of clobbering the code with a lot of print-statements. I
strongly recommend to trace your function, and perhaps insert
breakpoints and then single-step the execution to see where it goes
wrong.

One general note, as I see this rather often: It is not a good idea to
check for an empty list with (=0 (length List)). Instead, simply test if
the list is atomic or NIL. A 'length' call traverses the whole list.


> 3) (lst? (GetFullPath Item (dir Item)))    [line 38]  is not doing
> what I was expecting, returning T or NIL whether GetFullPath sends a
> list or not.

That's the correct behavior. It returns T if the argument is a
(possibly empty) list. What is wrong with this?


As an example, here is a simple function that recursively prints a
directory tree:

   (de dirTree (Path)
      (for F (dir Path)
         (let P (pack Path "/" F)
            (prinl P)
            (when (=T (car (info P)))
               (dirTree P) ) ) ) )

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to