Multiplication (*)
Airkit supports the standard multiplication operator *
. It is used to multiply Numbers together. It can also be used to multiply a Currency value by a Number.
Example
Multiplying Numbers
The following example shows how the multiplication operator is used to multiply the Number 2 and the Number 3 together. Note that it returns a another Number: 6, the product of 1 and 3:
Multiplying Currency
Say there exists a Currency value, example_currency
, defined as follows:
The multiplication operator can be used to multiply example_currency
by a Number, such as in the following example, which multiplies example_currency
by 2. Note that it returns a Currency:
It does not matter whether the Currency or the Number value is given first. The multiplication operator can be used to multiply a Number by a Currency just as well as it can be used to multiply a Currency by a Number:
The multiplication operator cannot be used to multiply two Currencies together.
Last updated