NCBI C++ ToolKit
|
Functions to manipulate the MONEY datatype. More...
Functions to manipulate the MONEY datatype.
Add two DBMONEY4 values.
dbproc | contains all information needed by db-lib to manage communications with the server. |
m1 | first operand. |
m2 | other operand. |
sum | output: result of computation. |
SUCCEED | usually. |
FAIL | on overflow. |
Definition at line 5502 of file dblib.c.
References CHECK_CONN, CHECK_NULP, dbproc, FAIL, DBMONEY4::mny4, SUCCEED, TDS_DBG_FUNC, and tdsdump_log.
Compare two DBMONEY4 values.
dbproc | contains all information needed by db-lib to manage communications with the server. |
m1 | some money. |
m2 | some other money. |
0 | m1 == m2. |
-1 | m1 < m2. |
1 | m1 > m2. |
Definition at line 5621 of file dblib.c.
References CHECK_NULP, CHECK_PARAMETER, dbproc, DBMONEY4::mny4, SYBENULL, TDS_DBG_FUNC, and tdsdump_log.
Copy a DBMONEY4 value.
dbproc | contains all information needed by db-lib to manage communications with the server. |
src | address of a DBMONEY4 structure. |
dest | output: new money. |
SUCCEED | or FAIL if src/dest NULL. |
Definition at line 5649 of file dblib.c.
References CHECK_CONN, CHECK_NULP, dbproc, FAIL, DBMONEY4::mny4, SUCCEED, TDS_DBG_FUNC, and tdsdump_log.
Negate a DBMONEY4 value.
dbproc | contains all information needed by db-lib to manage communications with the server. |
src | address of a DBMONEY4 structure. |
dest | output: result of negation. |
SUCCEED | usually. |
FAIL | on overflow. |
Definition at line 5455 of file dblib.c.
References CHECK_CONN, CHECK_NULP, dbmny4sub(), dbmny4zero(), dbproc, FAIL, TDS_DBG_FUNC, and tdsdump_log.
Subtract two DBMONEY4 values.
dbproc | contains all information needed by db-lib to manage communications with the server. |
m1 | first operand. |
m2 | other operand, subtracted from m1. |
diff | output: result of computation. |
SUCCEED | usually. |
FAIL | on overflow. |
Definition at line 5533 of file dblib.c.
References CHECK_CONN, CHECK_NULP, dbproc, FAIL, DBMONEY4::mny4, SUCCEED, TDS_DBG_FUNC, and tdsdump_log.
Referenced by dbmny4minus().
Zero a DBMONEY4 value.
dbproc | contains all information needed by db-lib to manage communications with the server. |
dest | address of a DBMONEY structure. |
SUCCEED | usually. |
FAIL | dest is NULL. |
Definition at line 5479 of file dblib.c.
References CHECK_CONN, CHECK_NULP, dbproc, FAIL, DBMONEY4::mny4, SUCCEED, TDS_DBG_FUNC, and tdsdump_log.
Referenced by dbmny4minus().
Compare two DBMONEY values.
dbproc | contains all information needed by db-lib to manage communications with the server. |
m1 | some money. |
m2 | some other money. |
0 | m1 == m2. |
-1 | m1 < m2. |
1 | m1 > m2. |
Definition at line 5175 of file dblib.c.
References CHECK_NULP, CHECK_PARAMETER, dbproc, DBMONEY::mnyhigh, DBMONEY::mnylow, SYBENULL, TDS_DBG_FUNC, and tdsdump_log.
Copy a DBMONEY value.
dbproc | contains all information needed by db-lib to manage communications with the server. |
src | address of a DBMONEY structure. |
dest | output: new money. |
SUCCEED | always, unless src or dest is NULL . |
Definition at line 5920 of file dblib.c.
References CHECK_CONN, CHECK_NULP, dbproc, FAIL, DBMONEY::mnyhigh, DBMONEY::mnylow, SUCCEED, TDS_DBG_FUNC, and tdsdump_log.
Subtract $0.0001 from a DBMONEY value.
dbproc | contains all information needed by db-lib to manage communications with the server. |
amount | address of a DBMONEY structure. |
SUCCEED | or FAIL if overflow or amount NULL. |
Definition at line 5400 of file dblib.c.
References CHECK_CONN, CHECK_NULP, dbproc, FAIL, DBMONEY::mnyhigh, DBMONEY::mnylow, SUCCEED, TDS_DBG_FUNC, and tdsdump_log.
Add $0.0001 to a DBMONEY value.
dbproc | contains all information needed by db-lib to manage communications with the server. |
amount | address of a DBMONEY structure. |
SUCCEED | or FAIL if overflow or amount NULL. |
Definition at line 5372 of file dblib.c.
References CHECK_CONN, CHECK_NULP, dbproc, FAIL, DBMONEY::mnyhigh, DBMONEY::mnylow, SUCCEED, TDS_DBG_FUNC, and tdsdump_log.
Get maximum negative DBMONEY value supported.
dbproc | contains all information needed by db-lib to manage communications with the server. |
amount | address of a DBMONEY structure. |
SUCCEED | Always. |
Definition at line 5275 of file dblib.c.
References CHECK_CONN, CHECK_NULP, dbproc, FAIL, DBMONEY::mnyhigh, DBMONEY::mnylow, SUCCEED, TDS_DBG_FUNC, and tdsdump_log.
Get maximum positive DBMONEY value supported.
dbproc | contains all information needed by db-lib to manage communications with the server. |
amount | address of a DBMONEY structure. |
SUCCEED | Always. |
Definition at line 5254 of file dblib.c.
References CHECK_CONN, CHECK_NULP, dbproc, FAIL, DBMONEY::mnyhigh, DBMONEY::mnylow, SUCCEED, TDS_DBG_FUNC, and tdsdump_log.
Negate a DBMONEY value.
dbproc | contains all information needed by db-lib to manage communications with the server. |
src | address of a DBMONEY structure. |
dest | output: result of negation. |
SUCCEED | or FAIL if overflow or src/dest NULL. |
Definition at line 5428 of file dblib.c.
References CHECK_CONN, CHECK_NULP, dbproc, FAIL, DBMONEY::mnyhigh, DBMONEY::mnylow, SUCCEED, TDS_DBG_FUNC, and tdsdump_log.
Set a DBMONEY value to zero.
dbproc | contains all information needed by db-lib to manage communications with the server. |
dest | address of a DBMONEY structure. |
SUCCEED | unless amount is NULL. |
Definition at line 5233 of file dblib.c.
References CHECK_CONN, CHECK_NULP, dbproc, FAIL, DBMONEY::mnyhigh, DBMONEY::mnylow, SUCCEED, TDS_DBG_FUNC, and tdsdump_log.