Looking for symbol in (symbols)

Started by cormullion, March 29, 2006, 11:52:30 PM

Previous topic - Next topic

cormullion

How do I find out whether a symbol is an existing (built-in) newLISP symbol:


(find rubbish (symbols))
;-> 204


It looks like the symbol is created first, then found.

Lutz

#1
'sym' with optionl 'nil' parameter suppresses creation and only checks existence:



> (sym "rubbish" MAIN nil)
nil
> (sym "println" MAIN nil)
println
>


see also http://newlisp.org/downloads/newlisp_manual.html#sym">http://newlisp.org/downloads/newlisp_manual.html#sym



Lutz

cormullion

#2
Thanks - that's the one!