belated response...
how about 'list tosymbol' and 'list fromsymbol'? I.e.
98 97 116 -> bat -> 98 97 116 On Wed, Aug 03, 2011 at 10:45:24PM +0100, Andy Farnell wrote:
On Wed, 3 Aug 2011 17:12:49 -0400 Hans-Christoph Steiner hans@at.or.at wrote:
On Aug 3, 2011, at 3:29 PM, Andy Farnell wrote:
On Wed, 3 Aug 2011 14:21:09 +0800 Chris McCormick chris@mccormick.cx wrote:
Would you consider adding a more generally useful [split] object
I agree this would be a useful core object.
What problems, if any, do you forsee?
Would those outputs implicitly be symbols? Or would we venture the types in advance like
[split f / f]
to obtain two floats
Turning the symbol 5/7 to a real number would then be
[symbol 5/7( | [split f / f] | / [/ ] | [number 0.714285]
I think to fit with the Pd type system in general, it should
automatically interpret things into floats and symbols (http://puredata.info/dev/PdDefinitions ):Pd Manual 2.1.2
"The text is divided into atoms separated by white space."
"Atoms are either numbers or symbols like '+'. "
Pd Manual 2.1.2
"Anything that is not a valid number is considered a symbol."
That seems unambiguous. So I guess if you wanted your "numbers" as symbols, you'd explicitly convert them back to symbols.
I used to use [symbol2list] a lot, so Iohannes suggestion is interesting. But could that split on an arbitary symbol like Chris suggests for the proposed [split] ?
a.
-- Andy Farnell padawan12@obiwannabe.co.uk
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list