dbmnysub

Description

Subtract one DBMONEY value from another.

Syntax

RETCODE dbmnysub(dbproc, m1, m2, difference)
 
DBPROCESS      *dbproc;
DBMONEY          *m1;
DBMONEY          *m2;
DBMONEY           *difference;

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.

m1

A pointer to the DBMONEY value to be subtracted from.

m2

A pointer to the DBMONEY value to subtract.

difference

A pointer to a DBMONEY variable to hold the result of the subtraction.

Returns

SUCCEED or FAIL.

dbmnysub returns FAIL in case of overflow, or if m1, m2, or difference is NULL.

Usage

See also

dbmnyadd, dbmnymul, dbmnydivide, dbmnyminus, dbmny4add, dbmny4sub, dbmny4mul, dbmny4divide, dbmny4minus