Hi Luis, pil pil_files.l -main is the correct version, don't know why it doesn't output anything though as I didn't try and run it myself.
Put a (bye) at the end of the script to avoid interactive mode. On Thu, Jul 10, 2014 at 1:06 AM, Luis P. Mendes <luisl...@gmail.com> wrote: > Hi again, sorry for these novice questions, but can't figure out why > this script doesn't run. > > Be "pil_files.l": > > #!/usr/bin/picolisp /usr/lib/picolisp/lib.l > > (de ffiles (dir_list) > (cond > ((=T (info (car dir_list))) (print "is directory")) > (print "is not directory"))) > > (de main () > (ffiles (dir))) > > > > And I try to run it with: > > $ pil pil_files.l -main + > : > (enters interactive mode) > > > $ pil pil_files.l -main > : > (no +, same result) > > > $ pil -main pil_files.l + > !? (main) > main -- Undefined > > $ pil -main pil_files.l > !? (main) > main -- Undefined > (no +, same result) > > $ ./pil_files.l > : > (as there's a shebang, but this one seems correct to me as I didn't > pass an argument and there's nothing to parse it). > > > But why does not `pil pil_files.l -main +` execute the function > ffiles with the list resulting from function `dir`? > > Thank you in advance Alex. > > > Luis > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe