Name

Pi Function

Syntax

function Pi: Extended

Description

The Pi function returns an approximation for the mathematical value of . The compiler expands this function inline so it can treat the Pi function as a constant and evaluate constant expressions that use Pi. The compiler also recognizes the context and uses the appropriate type and precision for its approximation (that is, Single, Double, or Extended). As a result, you get a better approximation of than you could get by writing a decimal constant.

See Also

Double Type, Extended Type, Single Type

Get Delphi in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.