[PD-dev] multiple $arg-expansion

IOhannes m zmoelnig zmoelnig at iem.at
Sat Jan 14 20:16:28 CET 2006


IOhannes m zmoelnig wrote:
>>
>> caveat: the A_DOLLARSYM still has to start with
>> "$[0-9]". this is the way, pd determines whether a
>> given symbol should be $-expanded or not. furthermore,
>> the leading $ is usually stripped by pd.
>> e.g. if you type [$1-bar-$2], the symbol "1-bar-$2" is
>> stored as A_DOLLARSYM. this means that the beginning of
>> the dollarsymbol always has to be expanded.
>> furthermore,  [bar-$2] will _never_ be expanded (since
>> pd thinks it is an ordinary symbol).
>>
>> i didn't dare to change this behaviour since
>> SETDOLLARSYM() and binbuf_realizedollsym() are exposed
>> in m_pd.h and probably used in externals which would
>> then break.
>> however, whenever this might change,
>> binbuf_expanddollsym() is prepared (just need to "#if 1")

actually it is binbuf_realizedollsym() that is prepared.

however, i did some quick greps over the entire CVS, and it seems that 
if we want to get rid of the restriction that A_DOLLARSYM has to start 
with "$" there are only very few "external" files that need to be 
modified, namely:
  externals/iemlib/src/iemlib2/iem_pbank_csv.c
  externals/miXed/shared/common/port.c
  externals/miXed/shared/common/lex.c
  externals/grill/flext/source/flattr_ed.cpp
  externals/grill/flext/source/flatom_pr.cpp

so that's only 3 libraries. i guess i will do it (if nobody finds a 
convincing argument to stop all this)

mf.a.ast
IOhannes




More information about the Pd-dev mailing list