I was trying to avoid the «? prompt» in case of an error.
I know that this REPL is sometimes useful, but not for my use case.
I eventually succeeded with (de *Err (bye)).

During this journey, I noticed a few things.
About *Err, the doc says in:
«a `prg` body». I didn't notice the use of `de`, so I first tried
silly things like:
(setq *Err (bye))  # this one is funny
(setq *Err '(bye))
(setq *Err "(bye)")
But none worked. So I went to:
A beginner may think that the body of `prog` is not really a list.
A beginner would rather think that the body of `run`
(or rather its first parameter) is a list.
So I didn't know what to do from here, except going to the part of
the docs where `any`, `cnt`, `prg`… are explained:
where indeed 'run is mentionned.
Then I went back to the doc of *Err:
and noticed that the official way to set it is (de *Err (bye))
I would have find this clearer: (setq *Err '((bye)))
To me, the use of 'de here is convoluted. I eventually realised how
it may work. My guess is that since (de a (x)) defines a function
taking an  evaluated param x, that returns nothing (or NIL), the
value of a is ((x)).

I'd understand that these suggestions would not make their
way to the official docs, but I know for sure that the prompt
at the end of the example here is a ? and not a $:

Anyway, I'm happy with PicoLisp !



http://profgra.org/lycee/ (site pro)
http://delicious.com/profgraorg (liens, favoris)
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to