Sign in Join
Wiki copytemporary

Int

English · Русский

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

Behavior

Int has effectively the following signature (actual declaration uses the compiler intrinsic):

pascal
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

See also


From the Free Pascal wiki, page "Int", as it stood on 2022-08-10 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.