Syntax |
expression1 * expression2 |
||
Description |
Returns the product of expression1 and expression2. |
||
Comments |
The result is the same type as the most precise expression, with the following exceptions: |
||
|
If one |
and the other |
then the type |
|
Single |
Long |
Double |
|
Boolean |
Boolean |
Integer |
|
Date |
Date |
Double |
|
When the * operator is used with variants, the following additional rules apply: Empty is treated as 0. If the type of the result is an Integer variant that overflows, then the result is automatically promoted to a Long variant. If the type of the result is a Single, Long, or Date variant that overflows, then the result is automatically promoted to a Double variant. If expression1 is Null and expression2 is Boolean, then the result is Empty. Otherwise, If either expression is Null, then the result is Null. |
||
Example |
This example assigns values to two variables and their product to a third variable, then displays the product of s# * t#. Sub Main() |
||
See Also |
Operator Precedence (topic) |
Symbols |