ToInt

Category: Strings

Back to System Functions


Signature

ToInt(text As String)

Returns

Integer

Description

Converts a string into an integer value.

The text may include an optional sign and a decimal point. If the text has a fractional part, the value is truncated toward zero. If the text is not a valid number, the result is 0.

Example

lives = ToInt("3") score = ToInt("42.9")