ToFloat

Category: Strings

Back to System Functions


Signature

ToFloat(text As String)

Returns

Float

Description

Converts a string into a single-precision floating-point value.

The text may include an optional sign and a decimal point. If the text is not a valid number, the result is 0.

Example

speed! = ToFloat("3.5") velocity! = ToFloat(userInput$)