On Apr 11, 2006, at 12:22 PM, Federico wrote:
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 :)
[sprintf] exists, its in cyclone. [scanf] would be nice too. In
fact, a whole POSIX lib would be handy.
.hc
Man has survived hitherto because he was too ignorant to know how to
realize his wishes.
Now that he can realize them, he must either change them, or perish.
-William Carlos
Williams