ADD
ADD returns the sum of x and y with a precision specified by p and q. If both operands are FIXED and at least one is FIXED BIN, then the base, precision, and scale are determined by the PRECTYPE compiler option. Otherwise, the base, precision, and scale are determined by the rules for expression evaluation. The mode is REAL if both operands are REAL; otherwise, it is COMPLEX.
- x and y
- Expressions.
- p
- Restricted expression. It specifies the number of digits to be maintained throughout the operation.
- q
- Restricted expression specifying the scaling factor of the result. For a fixed-point result, if q is omitted, a scaling factor of zero is the default, and if not omitted, it must be nonnegative. For a floating-point result, q must be omitted.
ADD can be used for subtraction by prefixing a minus sign to the operand to be subtracted.