Page 1 of 1

function CHAR$

Posted: Sun Nov 04, 2007 12:02 pm
by jeanmarc
Hello, i want to transform a string in to a number may i use de function CHAR$
and hoiw to use char$.

Best regards

J-M

Posted: Mon Nov 05, 2007 10:58 am
by Benj
Hello

You can use the char function to convert a single digit at a time.

For example
str1 = "1234"

num1 = '0' - (Char$(str1, 0))
num2 = '0' - (Char$(str1, 1))
num3 = '0' - (Char$(str1, 2))
num4 = '0' - (Char$(str1, 3))

num1 = 1
num2 = 2
num3 = 3
num4 = 4

Posted: Mon Nov 05, 2007 11:36 am
by jeanmarc
Thanks for your Help.

Regards

J-M DE BODT