..string to integer/float..
BlitzMax Forums/BlitzMax Programming/..string to integer/float..
| ||
..hi guys..just quickie one..how should i convert my integer/floats loaded as a string in to numeric variable.. |
| ||
With the String.ToInt() and String.ToFloat() methods? |
| ||
Like this :Global filename:String = "test.txt" Global file:TStream Global number1:Int Global number2:Int file = WriteFile(filename) WriteLine file,"4" WriteLine file,"6" CloseFile(file) file = ReadFile(filename) number1 = Int(ReadLine(file)) number2 = Int(ReadLine(file)) Print number1 + number2 CloseFile(file) |
| ||
..thanks guys... |