[PD-dev] [ pure-data-Patches-1543850 ] $@ and $# expansion (argc, argv)

SourceForge.net noreply at sourceforge.net
Wed Aug 23 00:21:14 CEST 2006

Patches item #1543850, was opened at 2006-08-21 06:24
Message generated for change (Comment added) made by eighthave
You can respond by visiting: 

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: wishlist
Status: Open
Resolution: None
Priority: 5
Submitted By: IOhannes m zmölnig (zmoelnig)
Assigned to: Miller Puckette (millerpuckette)
Summary: $@ and $# expansion (argc, argv)

Initial Comment:
the attached patch extends the $-expansion mechanism:

$# expands to the number of arguments; usable both as
A_DOLLAR (just "$#") and A_DOLLSYM ("$#-bla")

$@ expands to the entire list of arguments (e.g. [$@
$@( will expand [1 2 3( to [1 2 3 1 2 3(); this is only
usable as A_DOLLAR; i.e. [symbol $@-a( will always
expand to "$@-a"

well, its a way to deal with dynamic length lists that
is still missing in pd (though 1st steps have been made
with [list])

what is still missing is an expansion for the selector
of messages and objects (the selector of an object
would be the object's instantation name); would $$ be a
good name for this? (since $0 is already taken)


>Comment By: Hans-Christoph Steiner (eighthave)
Date: 2006-08-22 18:21

Logged In: YES 

Yes!  This is great!

As for the selector, $0 is not taken in message space, so I
think it makes sense there.  Since message expansion
variables are already different than object arguments, I
think that won't be too confusing.  Plus the $ variable
syntax comes from shell scripting, where $0 is basically the
selector of the message that is the command line arguments.


You can respond by visiting: 

More information about the Pd-dev mailing list