Hi Alex,


On 13-12-13 16:08 , Alexander Burger wrote:
Hi Jon,

(while T
     (let L (line)
         (prinl "Hello " (pack (trim L) "!") ) ) )
I haven't tried this specifically now, but I see two problems:

1. The loop

       (while T

    will never terminate. I would use

       (until (eof)

2. The PicoLisp always interprets the current input channel. This is,
    while a file is being 'load'ed, this very same file. So if you
    intend to read from standard input (what I assume here), you need
    an explicit

       (in NIL
          (until (eof)

Yes, doing "pil greeter.l +" now works, with this in my greeter.l file:

(in NIL
    (until (eof)
        (let L (pack (trim (line)))
            (prinl "Hello " L "!") ) ) )

/greeter.l: line 6: syntax error near unexpected token `('
/greeter.l: line 6: `    (let L (line)'
This, however, seems another problem. Obviously Bash tries to execute
this script. Something must have been wrong with the "#!" notation, so
that it was not recognized.

♪♫ Alex
I'll look into that "#!" thing another day. I don't think I've used it much, if at all, with PicoLisp.

Have a nice weekend!

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

Reply via email to