MULTIPLY
Syntax
MULTIPLY {src_num_lit|_var|_col} TIMES dst_num_var [ROUND=nn]
Description
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 the program multiplies many numbers in succession. These inaccuracies can appear due to the way different hardware and software implementations represent floating point numbers.
Parameters
| Parameter | Description |
|---|---|
|
src_num_lit | _var | _col |
Specifies a numeric source column, variable, or literal. |
|
dst_num_var |
Specifies a 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. |
See The ADD command for more
information
See The LET command for a discussion
of complex arithmetic expressions
Example
The following example illustrates the MULTIPLY command:
multiply &quantity times #cost
multiply 1.5 times #result