[PD] default value for an abstraction's creation argument
Mathieu Bouchard
matju at artengine.ca
Mon Jul 23 07:36:56 CEST 2007
On Mon, 23 Jul 2007, Frank Barknecht wrote:
> Almost as elegant as possible with current Pd: Arguments, that you
> don't specify, get initialized as 0.
That's not strictly true: if a dollsym gets expanded using nonexistent
arguments, those parts do not get replaced.
A_DOLLAR atoms are atoms that are just $0 $1 $2 $3... without anything to
the left or right (nonbackslashed commas-or-semicolons count as
delimiters). Expanding an A_DOLLAR gives exactly what the argument passed
was. In that context, nonexistent arguments become zeroes.
A_DOLLSYM atoms are atoms that are mixed symbol parts and dollar parts.
Before 0.40 this instead was only one dollar part followed by one symbol
part. In that context, nonexistent arguments stay exactly like they are.
(Instead I would've guessed empty symbols, but Pd isn't that consistent
when it comes to dummy symbols)
BTW, this can lead you to a way to figure out for sure whether a certain
argument was supplied or not, by checking the discrepancy between A_DOLLAR
and A_DOLLSYM, but that's quite twisted.
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada
More information about the Pd-list
mailing list