Hi,

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:
http://www.software-lab.de/doc/refE.html#*Err
«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:
http://www.software-lab.de/doc/refP.html#prog
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:
http://www.software-lab.de/doc/ref.html#fun
where indeed 'run is mentionned.
http://www.software-lab.de/doc/refR.html#run
Then I went back to the doc of *Err:
http://www.software-lab.de/doc/refE.html#*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 $:
http://www.software-lab.de/doc/refE.html#*Err

Anyway, I'm happy with PicoLisp !


chri

-- 

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

Reply via email to