Single.FromText

From Xojo Documentation

Shared Method

Single.FromText(theText As Text, Optional locale As Xojo.Core.Locale) As Single

Converts a Text 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 Text value to a Single:

Dim userValue As Text
userValue = "123.45"

Dim d As Single
d = Single.FromText(userValue)