MULTIPLY

Function

Multiplies one number by another.

Syntax

MULTIPLY {src_num_lit|_var|_col} TIMES dst_num_var
[ROUND=nn]

Arguments

src_num_lit|_var|_col

Numeric source column, variable, or literal.

dst_num_var

Destination numeric variable.

ROUND

Rounds the result to the specified number of digits to the right of the decimal point. For float variables, this value can be from 0 to 15. For decimal variables, this value can be from 0 to the precision of the variable. For integer variables, this argument is not appropriate.

Description

MULTIPLY multiplies the first field by the second and places the result into the second field.

When dealing with money-related values (dollars and cents), use decimal variables rather than float variables. Float variables are stored as double precision floating point numbers, and small inaccuracies can appear when multiplying many numbers in succession. These inaccuracies can appear due to the way different hardware and software implementations represent floating point numbers.

Examples

multiply  &quantity  times  #cost
multiply  1.5  times  #result

See Also