User Guide
154 Chapter 9: Constants
FALSE
Usage
-- Lingo syntax
FALSE
// JavaScript syntax
false
Description
Constant; applies to an expression that is logically FALSE, such as 2 > 3. When treated as a
number value,
FALSE has the numerical value of 0. Conversely, 0 is treated as FALSE.
Example
This statement turns off the soundEnabled property by setting it to FALSE:
-- Lingo syntax
_sound.soundEnabled = FALSE
// JavaScript syntax
_sound.soundEnabled = false;
See also
if, not, TRUE
PI
Usage
-- Lingo syntax
PI
// JavaScript syntax
Math.PI
Description
Constant; returns the value of pi (π), the ratio of a circle’s circumference to its diameter, as a
floating-point number. The value is rounded to the number of decimal places set by the
floatPrecision property.
Example
This statement uses the PI constant as part of an equation for calculating the area of a circle:
-- Lingo syntax
vRadius = 3
vArea = PI*power(vRadius, 2)
trace(vArea) -- results in 28.2743
// JavaScript syntax
var vRadius = 3;
vArea = Math.PI*Math.pow(vRadius, 2);
trace(vArea); // results in 28.274333882308138