Single.FromString

From Xojo Documentation

Shared Method

Single.FromString(theString As String, Optional locale As Locale) As Single

Converts a String value that containing a number that can be represented as a single to a Single.

Notes

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

Sample Code

Convert a String value to a Single:

Var userValue As String
userValue = "123.45"

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