Christophe Gragnic
<christophegrag...@gmail.com> writes:

> On Fri, Jan 24, 2014 at 10:54 PM, Axel Svensson
> <svenssona...@gmail.com> wrote:
>> If you need to output something that isn't 'read' readable, then you're
>> trying to output something that isn't lisp code. If that is the case, use
>> the functions to output text rather than code.
>>
>> (prin "(This 'is (not) \"\\code\" ..)")
>
> Thanks for the answer Axel. It makes sense.
> Using «prin», PicoLisp (and EmuLisp!) print «\\» with a single «\».
> But I'd rather assign the result to a js var.
> Now two possibilities:
> 1) Jon knows how to assign a «prin» to a js var (kind of ugly).
> 2) There is a PicoLisp function for this, other than «prin», that
> returns instead of printing.


what about this (although no slash at all remains):

,-----------------------------------------------------------------------
| : (pipe (out (prin "(This 'is (not) \"\\code\" ..)")) (setq X (read)))
| -> (This 'is (not) "code" ..)
| : X
| -> (This 'is (not) "code" ..)
`-----------------------------------------------------------------------

-- 
cheers,
Thorsten

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

Reply via email to