Multiply a DBMONEY value by a positive integer and add a specified amount.
RETCODE dbmnyscale(dbproc, mnyptr, multiplier, addend) DBPROCESS *dbproc; DBMONEY *mnyptr; int multiplier; int addend;
A pointer to the DBPROCESS structure that provides the connection for a particular front-end/server process. It contains all the information that DB-Library uses to manage communications and data between the front end and the server.
This parameter may be NULL. The DBPROCESS is used as a parameter to an application’s error handler. It also contains information on what language to print error messages in. If a DBPROCESS is not supplied, the default national language is used.
A pointer to the DBMONEY value to multiply. *mnyptr will also contain the result of the dbmnyscale operation.
The integer by which *mnyptr will be multiplied. multiplier must be positive, and must be greater than or equal to 1, and less than or equal to 65535.
An integer representing the number of ten-thousandths of a dollar to add to *mnyptr after the multiplication.
SUCCEED or FAIL.
dbmnyscale returns FAIL if mnyptr is NULL, if overflow occurs, or if multiplier is not between 1 and 65535.
dbmnyscale multiplies a DBMONEY value by a short integer, adds addend ten-thousandths of a dollar, and places the result back in the original DBMONEY variable.
multiplier must be greater than or equal to 1, and less than or equal to 65535.
In case of overflow, dbmnyscale returns FAIL. *mnyptr is undefined in this case.
The range of legal DBMONEY values is between +/-$922,337,203,685,477.5808. DBMONEY values have a precision of one ten-thousandth of a dollar.