Splicing a symbol into separate characters

May 13, 2011 at 9:16am

Splicing a symbol into separate characters

I’m working on a patch for the generation of serial protection codes. I have a nice algorithm that spits out 16 one character digits (1 3 4 2 5 etc) in a list. With [tosymbol] I change it into a single line of code without the spaces.

The next step would be to turn this line of code back into a list, but how do I extract seperate symbols out of a bigger symbol? To be more exact, how can I get the nth character out of a symbol?

#57108
May 13, 2011 at 9:32am

Never mind, worked it out! Combination of [atoi] and subtracting 48 through [zl iter 1]!

#204572
May 13, 2011 at 9:33am
– Pasted Max Patch, click to expand. –

The zl object is great for list related stuff.

#204573
May 13, 2011 at 9:38am

staxas, [zl] is your friend..

– Pasted Max Patch, click to expand. –

rob

edit: too late again :)

#204574

You must be logged in to reply to this topic.