Page 1 of 1

A proper noob question about string to int conversion

Posted: Tue Mar 16, 2004 4:11 pm
by Beeps
Right then, I've got a string...

Code: Select all

A$="123"
...and I want to use it as a number but..

Code: Select all

int(A$)
...always gives me 0, what do i need to do to convert a string to a numeric?

Posted: Tue Mar 16, 2004 4:23 pm
by freak
Use Val() to convert a string into an integer (byte, word, long), or
ValF() to convert it into a Float value.

Timo

Posted: Tue Mar 16, 2004 4:43 pm
by Beeps
I new it would be simple, just couldn't find it in the docs.

Thanks.

Posted: Tue Mar 16, 2004 6:02 pm
by Kris_a
Beeps wrote:... just couldn't find it in the docs.
Join the club :D