Separate a long number into smaller numbers
Hi there
I'm trying to figure out a way to split up a long number like 606569 into 60 65 69
I figured it would be a simple task but I've spent hours looking around the forum to no avail.
I've been looking at the regexp object, but I really dont understand the syntax for it so I'm not getting the right result :S
Pretty sure this will be an easy one for someone.
Thanks
Lee
hth
o
since regexp gives me nightmares as well (I really ought to learn it one of these days) here is a more Max "friendly" way... sure there are better ones out there.
Thanks so much guys! Both these ways work perfectly.
Lee
And here's a way with arithmetic operators only. Modulo is your friend.
All of the solutions shown have issues with negative values. All also have the possible issue that the two-digit results drop leading zeros. Both of these issues left as an exercise for the reader.
Oops… wanted to take a look at the first example before posting mine, then lost track of what was on the clipboard. So now I have to recreate the patch. Easily enough done…