*

Syntax expression1 * expression2

Action The arithmetic multiplication operator yields the product of the values of expression1 and expression2.

Examples 3 * 0.5

   » 1.5

The number 3 is "promoted" to a double, the type of 0.5, in order to perform the multiplication.

"abc" * "def"

   »

This statement generates an error; only numbers can be used as multiplication operands.

Notes UserTalk employs automatic type coercion when evaluating arithmetic and comparative operations; the two expressions need not be of the same type to be multiplied together. Generally, the resulting type is the more complex type, the one that can most

readily represent both values.

Only numeric-compatible types - short, long, single, double, date, etc. - can be multiplied.

See Also +

-

/

%

Discuss