[PD-dev] how to look up whether a symbol already exists?

Mathieu Bouchard matju at artengine.ca
Mon Nov 26 22:18:19 CET 2007


On Fri, 23 Nov 2007, Hans-Christoph Steiner wrote:

> Is there anyway to check whether a symbol already exists?

As a normal external, the best you can do as an external is to check 
whether a symbol is used as receive-symbol or not. You can't do anything 
about the existence of a symbol apart from ensuring that it exists by 
calling gensym().

If you want to go abnormal, use do_gensym() directly. The second argument 
is a symbol that will be returned to you if there is no symbol 
corresponding to the second argument. (If the second argument is a null 
pointer, it does the same as gensym())

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada


More information about the Pd-dev mailing list