[PD] dealing with arguments and inlets
Hans-Christoph Steiner
hans at eds.org
Sun Feb 5 20:55:07 CET 2006
On Feb 5, 2006, at 2:35 PM, Mathieu Bouchard wrote:
> On Sun, 5 Feb 2006, Hans-Christoph Steiner wrote:
>
>> [float_argument], [symbol_argument], and [any_argument] (previously
>> [list_argument]) can do defaults like this: [symbol_argument $1
>> default]
>> so we already got that part of [patcherargs] covered.
>>
>> As for using an indeterminate amount of arguments, I think that would
>> be
>> better supported using $# and $@ in Pd (or perhaps $argc and $argv).
>
> If you believe that abstractions are better than externals, I
> would suppose that it also implies that externals are better than
> new syntax. After all, an external is usable by all right now,
> whereas modifying pd is somewhat more troublesome.
>
> Now tell me, why do you like $# and $@ over [patcherargs] ?
Languages that provide arguments generally provide argc and argv. I
think Pd should too.
C, C++ has argc, argv
Java has args.getLength, String[] args
bourne shell has $#, $@
C shell has $#argv, $argv
Perl has $#argv, @argv
.hc
________________________________________________________________________
____
"I have the audacity to believe that peoples everywhere can have three
meals a day for their bodies, education and culture for their minds,
and dignity, equality and freedom for their spirits."
- Martin Luther King, Jr.
More information about the Pd-list
mailing list