Hi list,

I'm going through the picolisp application development tutorial (
http://software-lab.de/doc/app.html#tags) and I'm trying this piece of code
at the tags section:

: (<div> 'main
   (<h1> NIL "Head")
   (<p> NIL
      (<br> "Line 1")
      "Line"
      (<nbsp>)
      (+ 1 1) ) )
<div class="main"><h1>Head</h1>
<p>Line 1<br/>
Line 2</p>
</div>

the problem is that, when I run it, I get this:

: (<div> 'main
   (<h1> NIL "Head")
   (<p> NIL
      (<br> "Line 1")
      "Line"
      (<nbsp>)
      (+ 1 1) ) )
<div class="main"><h1>Head</h1>
<p>Line 1<br/>
Line&nbsp;</p>
</div>

That is, the (+ 1 1) part is not evaluated.

I run it both as a file loaded from the terminal by pil in a session started as:
pil @lib/http.l @lib/xhtml.l @lib/form.l --server 8080 project.l

And in a modified version of psh, but still the (+ 1 1) is not evaluated.

The evaluation only happens if I add an accent to the (+ 1 1)
(<div> 'main
      (<h1> NIL "Head")
      (<p> NIL
         (<br> "Line 1")
         "Line"
         (<nbsp>)
         `(+ 1 1) ) )
<div class="main"><h1>Head</h1>
<p>Line 1<br/>
Line&nbsp;2</p>
</div>

It also works if I just put the number, and if I nest it in a print
statement, like
(prin (+ 1 1)).

Can someone help me figure why this happens?

Reply via email to