dbmnyscale

Description

Multiply a DBMONEY value by a positive integer and add a specified amount.

Syntax

RETCODE dbmnyscale(dbproc, mnyptr, multiplier, addend)
 
DBPROCESS  *dbproc;
DBMONEY      *mnyptr;
int                     multiplier;
int                     addend;

Parameters

dbproc

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.

mnyptr

A pointer to the DBMONEY value to multiply. *mnyptr will also contain the result of the dbmnyscale operation.

multiplier

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.

addend

An integer representing the number of ten-thousandths of a dollar to add to *mnyptr after the multiplication.

Returns

SUCCEED or FAIL.

dbmnyscale returns FAIL if mnyptr is NULL, if overflow occurs, or if multiplier is not between 1 and 65535.

Usage

See also

dbmnydown, dbmnymul, dbmny4mul