B4R Question string to double

Mostez

Well-Known Member
Licensed User
Longtime User
Hello;
how to convert "125.36" string to double? i want to do something like:

B4X:
Dim StrVal As String = "125.36"
Dim Dval As Double = Val(StrVal)

Thanks
 

emexes

Expert
Licensed User
B4X:
Dim StrVal As String = "125.36"
Dim Dval As Double = StrVal
Rarely hurts to check the string beforehand.

upload_2019-10-6_15-19-40.png


edit: deleted non-B4R reference: "or to wrap the conversion in a Try..Catch"
 
Last edited:
Upvote 0
Top