MULT

Use the MULT script function to multiply two values and return the result as a 16-digit alphanumeric string with leading zeros.

Syntax

MULT (Operand1, Operand2)

Parameters

Notes:

Tip: You can remove leading zeros and otherwise edit the format of results with the FORMAT script function.

Examples

The following example passes the multiplication result (100) to a script variable. The example uses two variables as operands:

:SET  &OP1# = 4
:
SET  &OP2# = 25
:
SET  &RESULT# = MULT(&OP1#,&OP2#)

The following example multiplies floating-point numbers and prints the result in the activation report:

:DEFINE &RESULT#,float
:SET &RESULT#MULT(-10.31,5.45)
:P &RESULT#

The result in the activation report would look like this:

U0020408 -0000000000000056.1895000000000000

The following example shows how to perform a multiplication using an arithmetic expression:

:SET &MULTIPLY# = 7 * 8
:
P &MULTIPLY#

The result in the activation report would look like this:

U0020408 0000000000000056

See also:

seealso

Arithmetic Calculations in Scripts