Y yuhong Member Licensed User Longtime User Oct 27, 2012 #1 I want write EditText.Text as Number to MAP. b4a has a Function? I don't use: Dim i as int i=editText1.Text map.add('num')=i
I want write EditText.Text as Number to MAP. b4a has a Function? I don't use: Dim i as int i=editText1.Text map.add('num')=i
Erel B4X founder Staff member Licensed User Longtime User Oct 27, 2012 #2 The compiler will convert the string to number as needed. If you want to explicitly convert it you can use: B4X: Sub CInt(s As String) As Int Return s End Sub Upvote 0
The compiler will convert the string to number as needed. If you want to explicitly convert it you can use: B4X: Sub CInt(s As String) As Int Return s End Sub
khosrwb Active Member Licensed User Longtime User Jul 3, 2015 #4 excuseme I don't underestand how to convert edittext.text to a number Attachments convert string to int.zip 5.6 KB · Views: 457 Upvote 0
Cableguy Expert Licensed User Longtime User Jul 3, 2015 #5 khosrwb said: excuseme I don't underestand how to convert edittext.text to a number Click to expand... dim s as int s = edittext.text or add Erel's suggested sub to your project and call it passing the string Upvote 0
khosrwb said: excuseme I don't underestand how to convert edittext.text to a number Click to expand... dim s as int s = edittext.text or add Erel's suggested sub to your project and call it passing the string