contents.gifindex.gifprev0.gifnext1.gif

* Operator

Purpose

Used to multiply two numbers.

Syntax

result = operand1 * operand2

Notes

The operands can be any numeric expression.

The data type of result is usually the same as that of the most precise operand. The order of precision, from least to most precise, is Integer, Long, Single, Double, Currency. The following are exceptions to this order:

traxhelp00090000.gif When multiplication involves a Single and a Long, the data type of result is converted to a Double.

traxhelp00090000.gif When the data type of result is a Variant of VarType 3 (Long), VarType 4 (Single), or VarType 7 (Date) that overflows its legal range, result is converted to a Variant of VarType 5 (Double).

traxhelp00090000.gif When the data type of result is a Variant of VarType 2 (Integer) that overflows its legal range, result is converted to a Variant of VarType 3 (Long).

If one or both operands are Null expressions, result is a Null. Any operand that is Empty (VarType 0) is treated as 0.

Example

This example determines total tax by using the * operator to multiply 10,000 by a tax rate of 18 percent. After the calculation, TotalTax equals 1800.

GrossPay = 10000
// Assign gross pay.
TotalTax = .18 * GrossPay
// Calculate total tax.