Double.FromString

From Xojo Documentation

Shared Method

Double.FromString(value As String, Optional locale As Locale) As Double

New in 2019r2

Converts a String value containing a number that can be represented as a double to a Double value.

Notes

If no locale is specified, then Locale.Raw is used.

Sample Code

Convert values to the Double type:

Var userValue As String
userValue = "123.45"

Var d As Double
d = Double.FromString(userValue)

Var locale As New Locale("en-US")
Var value As Double

userValue = "123.45"
value = Double.FromString(userValue, locale) ' value = 123.45

See Also

Double.ToString