Single.FromString

From Xojo Documentation

Revision as of 21:04, 7 August 2019 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

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)