[PD] feature request for [list]

Federico xaero at inwind.it
Tue Apr 11 18:22:41 CEST 2006


Roman Haefeli wrote:

> hi all
>
> more and more i realize that i can do most basic things in pd without 
> externals. before all, the introduction of [list] made many objs of 
> externals, that i used a lot, obsolete. one (in my eyes) basic task 
> remains uncovered by list: splitting symbols into lists (e.g. 
> separated by a separator-char). it would be very nice, if this could 
> be done in future versions of pd.

i would like to see a [sscanf] object....
and a [sprintf] one too.

these are standard functions of C language.

[sprintf] would act like [makefilename], except that accept more than 
one variable (makefilename gives unpredictable results sending lists 
with a format string like a%d_b%d).

so, an example of how [sprintf] should act:

[list foo bar 34(
|
[sprintf %s-%s-%d]

would return a symbol: foo-bar-34
and sscanf would do the inverse job:

[symbol foo-bar-34(
|
[sscanf %s-%s-%d]

would return a list:
symbol foo, symbol bar, float 34


consider this just a request for comment :)
-- 
ciao
Federico




More information about the Pd-list mailing list