Converts a numeric string or floating-point value to an integer.

IntValue := Integer(Value)

Return Value

Type: Integer

This function returns the result of converting Value to a pure integer (having the type name "Integer"), or Value itself if it is already the correct type.


Any fractional part of Value is dropped, equivalent to Value < 0 ? Ceil(Value) : Floor(Value).

If the value cannot be converted, a TypeError is thrown.

To determine if a value can be converted to an integer, use the IsNumber function.

Integer is actually a class, but can be called as a function. Value is Integer can be used to check whether a value is a pure integer.

Type, Float, Number, String, Values, Expressions, Is functions