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 UserProc;
Var
    i: Integer;
    s: String;
Begin
    s := "123456";
    i := Integer.Parse(s);
    Debug.WriteLine(i);
End Sub UserProc;

After executing the example the "i" variable contains the 123456 value.

See also:

Integer