Integer.Parse

Syntax

Parse(Value: String): Integer;

Parameters

Value. String value that must be converted into integer type.

Description

The Parse method converts a string value into an integer without checking for the string correctness.

Comments

This method does not take into account specified regional parameters. The symbol dividing integral and fractional parts of a number is not used in the value passed by the Value parameter.

If converting fails, an exception is thrown.

To convert real numbers in accordance with the specified regional parameters, use the following methods:

Example

Sub Main;

Var

i: Integer;

s: String;

Begin

s := "123456";

i := Integer.Parse(s);

End Sub Main;

After executing the example the "i" variable will contain the value 123456.

See also:

Integer