String to number - Array

SOLVED
Hi all,

I am trying to build a SPE to capture a number (Field is a text), split the digits, multiply each one, sum all and validate the result.
I have some questions:
1 - Now, I am working with STRING and I need convert this String to a Integer, so I will be able to sum, multiply, etc.
2 - Is this the correct way to split the number?
3 - How can I build it better?

#This is a test script.




Local Char NUMB(255) : NUMB = "12345678901"
Local Char NUMBARRAY(11)(11)
NUMBARRAY (0) = seg$(NUMB,1,1)
Infbox NUMBARRAY (0)*5 # Just a test
NUMBARRAY (1) = seg$(NUMB,2,2)
Infbox NUMBARRAY (1)*4
NUMBARRAY (2) = seg$(NUMB,3,3)
Infbox NUMBARRAY (2)*3
NUMBARRAY (3) = seg$(NUMB,4,4)
Infbox NUMBARRAY (3)*2
NUMBARRAY (4) = seg$(NUMB,5,5)
Infbox NUMBARRAY (4)*7
NUMBARRAY (5) = seg$(NUMB,6,6)
...

Thank you!