Using Director > Writing Scripts with Lingo > Expressing literal values > Using decimal numbers

 

Using decimal numbers

A decimal number, sometimes called a floating-point number, is any number that includes a decimal point. The floatPrecision property controls the number of decimal places used to display these numbers. (However, Director always uses the complete number in calculations.) See the floatPrecision entry in Director Help or the Lingo Dictionary for information about setting the number of decimal places used for decimal numbers.

You can also use exponential notation with decimal numbers: for example, -1.1234e-100 or 123.4e+9.

You can convert an integer or string to a decimal number by using the float() function. For example, the statement set theNumber = float(3) stores the value 3.0 in the variable.