how to convert string to val
Monkey Forums/Monkey Programming/how to convert string to val
| ||
StringNum$=45 Number=StringNum results number=45 |
| ||
Local StringNumber:String = "400" Local Number:Int = Int(StringNumber) |
| ||
tnx but what about floating numbers ah got it . i use command FLOAT() |
| ||
yup :) |
| ||
Remember to trim your string when converting to a number for Android or it will crash:Local StringNumber:String = "400" Local Number:Int = Int(StringNumber.Trim()) BTW its called "Casting" :) |
| ||
omg ok |