Int

The function Int returns the integer part of the argument. It is an UCSD Pascal extension supported by the FPC as an InternProc.

Behavior

edit

Int has effectively the following signature (fpc/source/blob/release_3_2_0/rtl/inc/mathh.inc#L116 actual declaration uses the compiler intrinsic):

function Int(X: Real): Real;

X must be a real-type expression. The result is the integer part of X, rounded toward zero as a real value. It is semantically equivalent to Trunc(X) * 1.0 (Trunc would cause an error if there did not exist an appropriate integer value).

Application

edit

See also

edit