split numbers

Qualm's icon

How do you solve this?

let's say you have the number 567
and you wnat to slice i up to 5 6 7 so you can send i to a
select object to test it.

Many thanks

/Fredrik

bkshepard's icon

regexp allows you to do that.

Max Patch
Copy patch and select New From Clipboard in Max.

Qualm's icon

many thanks

/Fredrik

Peter Castine's icon

You can also use [% 10], [% 100], and other modulo and division operators to separate out individual digits. In some circumstances this can be easier than regexp.

Stephen Lee's icon

Yet another way would be to use atoi and then subtract 48 from all elements in the list using vexpr.

Qualm's icon

Thanks all. You are very kind!

Joe's icon

Hi

I am trying something similar, but producing bangs to messages after selecting a number. However, it is only selecting the first digit and not the remaining two numbers.

Is it even possible to do this with a delay 500 between each bang?

Max Patch
Copy patch and select New From Clipboard in Max.

metamax's icon

@Joe: [zl queue]

Max Patch
Copy patch and select New From Clipboard in Max.

-