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:

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

Thanks
 
Code: Copy
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
Back
Top