Click or drag to resize

PI Function

X#
Returns the numeric constant pi.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 FUNCTION PI() AS REAL8
Request Example View Source

Return Value

Type: Double
PI( )Return Value Numeric
Remarks
The numeric constant pi (3.141592) is the ratio of the circumference of a circle to its diameter. The number of decimal places displayed in the value returned by PI( ) is determined by SET DECIMALS.
Examples
 
X#
1CLEAR
2? PI( ) // Displays 3.14
3STORE 2.30 TO gnRadius
4STORE PI( ) * gnRadius^2 TO gnArea
5? gnArea  // Displays 16.6190
See Also