[PD] symbol2list leading zero
reduzent at gmail.com
Thu Nov 3 21:09:21 CET 2011
On Thu, 2011-11-03 at 10:51 -0400, Mathieu Bouchard wrote:
> Le 2011-11-03 à 09:20:00, IOhannes m zmoelnig a écrit :
> > On 2011-11-02 18:06, rolf meesters wrote:
> >> would it then be necessary, working with texts, always to check if one's
> >> not accidentally losing zero's?
> > btw, you are not "losing" any zeros.
> > whether your pay cheque says "100,-€" or "000000000000100,-€" does not
> > make any difference, when it comes to buying your marmite. those numbers
> > are exactly the same.
> And this is exactly not what Rolf is talking about.
> Surely you know the difference between string comparisons and number
> If someone just wants to split lists instead of converting to floats and
> getting weird answers on pd-list, there's [gf/s2l], which does not do
> anything else than splitting (as it is like with any string-splitter
> outside of pd/max).
Yeah, and currently there is no way really to tell Pd whether something
should be of the type symbol or float, so the fact that it assumes
anything that looks like a number to be float makes sense (you can still
force numbers to be symbols as few already suggested). And it does not
make so much sense to compare Pd/Max to anything outside of Pd/Max.
[symbol2list] behaves pretty sensible in its context, as pretty much
anything in Pd converts 00023.1 or 23.100000 to 23.1.
Calling the previous answers 'weird' is inappropriate, IMHO.
(BTW, I'm not saying I favor Pd's limited type casting capabilities)
More information about the Pd-list