Number splitting possible?

May 17, 2010 at 6:40pm

Number splitting possible?

If I have a number, say 91

Is it possible to split it, and have 9 out of one output, and then 1 out another?

Sorry if it’s stupidly easy, I can’t figure it out :(

Thanks.

#50416
May 17, 2010 at 6:45pm

dividing and modulo:

– Pasted Max Patch, click to expand. –
#180903
May 17, 2010 at 7:42pm

Or regexp:

– Pasted Max Patch, click to expand. –
#180904
May 17, 2010 at 8:17pm

The regexp solution is considerably slower than the direct math solution, and it might be hard to nicely unpack into individual digits.

– Pasted Max Patch, click to expand. –
#180905
May 17, 2010 at 11:45pm

ahh, it really is slower!

#180906

You must be logged in to reply to this topic.