Re: (pack (intern NIL)) bug?

2009-04-22 Thread Alexander Burger
On Wed, Apr 22, 2009 at 10:07:54AM +0100, Tomas Hlavaty wrote: Are there other special symbols in the 32bit PicoLisp that behave like NIL? Not that I can think of any. Except for the mentioned example where symbols look like numbers. Cheers, - Alex -- UNSUBSCRIBE:

Re: (pack (intern NIL)) bug?

2009-04-22 Thread Tomas Hlavaty
Hi Alex, The question is: What is the correct way? I am writing my own sexp reader which is safe against malicious input, i.e. it does not call eval (the escape chars like ` are not understood). : (intern 123) - 123 : (+ @ 7) 123 -- Number expected I thought I could use

(pack (intern NIL)) bug?

2009-04-21 Thread Tomas Hlavaty
Hi Alex, is there a function to look up an interned symbol? 'intern' does not seem to be doing that: : (intern NIL) - NIL : (pack NIL) - NIL : (pack (intern NIL)) - NIL : This behaviour seems a bit strange to me. I would expect (pack (intern NIL)) to return NIL... Thank you, Tomas --