From Xojo Documentation

Shared Method

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

Supported for all project types and targets.

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


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)