newLISP Fan Club

Forum => Anything else we might add? => Topic started by: cormullion on March 29, 2006, 11:52:30 PM

Title: Looking for symbol in (symbols)
Post by: cormullion on March 29, 2006, 11:52:30 PM
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.
Title:
Post by: Lutz on March 30, 2006, 05:24:53 AM
'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



Lutz
Title:
Post by: cormullion on March 30, 2006, 05:43:15 AM
Thanks - that's the one!