dbmnydown

Description

Divide a DBMONEY value by a positive integer.

Syntax

RETCODE dbmnydown(dbproc, mnyptr, divisor, remainder)
 
DBPROCESS    *dbproc;
DBMONEY        *mnyptr;
int                  divisor;
int                *remainder;

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 divide. *mnyptr will also contain the result of the division.

divisor

The integer by which *mnyptr will be divided. divisor must be positive, and must be less than or equal to 65535.

remainder

A pointer to an integer variable to hold the remainder from the division, in ten-thousandths of a dollar. If remainder is passed as NULL, no remainder is returned.

Returns

SUCCEED or FAIL.

dbmnydown returns FAIL if mnyptr is NULL, or if divisor is not between 1 and 65535.

Usage

See also

dbmnyscale, dbmnydivide, dbmny4divide