Shop OBEX P1 Docs P2 Docs Learn Events
I need a split function equivalent — Parallax Forums

I need a split function equivalent

johnnycarlosjohnnycarlos Posts: 44
edited 2010-06-18 21:23 in Propeller 1
Hi Everyone,

Still new to Spin, but I've learned a lot this week. My next project has hit a snag because I need to find the equivalent of a "split" function. Here is what I am trying to do, I have a byte variable like:

wholeVar = 73

and I want to split it into two variables as such:

splitVar1 := 7
splitVar2 := 3

or stored in an array that I can walk through. Or, any other way that I can retrieve the digits. Any ideas?

I am committed to mastering Spin. So some day I'll be answering these questions instead of asking them [noparse]:)[/noparse]

Thanks for your help.

John

Comments

Sign In or Register to comment.