EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 601

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING
1130 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
* (multiplication) 601
// JavaScript syntax
put((2 + 3) * (4 + 5));
// 45
put(2 + (3 * (4 + 5)));
// 29
put(2 + 3 * 4 + 5);
// 19
* (multiplication)
Usage
-- Lingo syntax
expression1 * expression2
// JavaScript syntax
expression1 * expression2
Description
Math operator; performs an arithmetic multiplication on two numerical expressions. If both
expressions are integers, the product is an integer. If either or both expressions are floating-point
numbers, the product is a floating-point number.
This is an arithmetic operator with a precedence level of 4.
Example
This statement multiplies the integers 2 and 3 and displays the result in the Message window:
-- Lingo syntax
put(2 * 3)
// JavaScript syntax
put(2 * 3);
The result is 6, which is an integer.
This statement multiplies the floating-point numbers 2.0 and 3.1414 and displays the result in
the Message window:
-- Lingo syntax
put(2.0 * 3.1416)
// JavaScript syntax
put(2.0 * 3.1416);
The result is 6.2832, which is a floating-point number.