Functions | |
| RETCODE | dbmny4add (DBPROCESS *dbproc, DBMONEY4 *m1, DBMONEY4 *m2, DBMONEY4 *sum) |
| Add two DBMONEY4 values. | |
| int | dbmny4cmp (DBPROCESS *dbproc, DBMONEY4 *m1, DBMONEY4 *m2) |
| Compare two DBMONEY4 values. | |
| RETCODE | dbmny4copy (DBPROCESS *dbproc, DBMONEY4 *src, DBMONEY4 *dest) |
| Copy a DBMONEY4 value. | |
| RETCODE | dbmny4divide (DBPROCESS *dbproc, DBMONEY4 *m1, DBMONEY4 *m2, DBMONEY4 *quotient) |
| Divide two DBMONEY4 values. | |
| RETCODE | dbmny4minus (DBPROCESS *dbproc, DBMONEY4 *src, DBMONEY4 *dest) |
| Negate a DBMONEY4 value. | |
| RETCODE | dbmny4mul (DBPROCESS *dbproc, DBMONEY4 *m1, DBMONEY4 *m2, DBMONEY4 *prod) |
| Multiply two DBMONEY4 values. | |
| RETCODE | dbmny4sub (DBPROCESS *dbproc, DBMONEY4 *m1, DBMONEY4 *m2, DBMONEY4 *diff) |
| Subtract two DBMONEY4 values. | |
| RETCODE | dbmny4zero (DBPROCESS *dbproc, DBMONEY4 *dest) |
| Zero a DBMONEY4 value. | |
| RETCODE | dbmnyadd (DBPROCESS *dbproc, DBMONEY *m1, DBMONEY *m2, DBMONEY *sum) |
| Add two DBMONEY values. | |
| int | dbmnycmp (DBPROCESS *dbproc, DBMONEY *m1, DBMONEY *m2) |
| Compare two DBMONEY values. | |
| RETCODE | dbmnycopy (DBPROCESS *dbproc, DBMONEY *src, DBMONEY *dest) |
| Copy a DBMONEY value. | |
| RETCODE | dbmnydec (DBPROCESS *dbproc, DBMONEY *amount) |
| Subtract $0.0001 from a DBMONEY value. | |
| RETCODE | dbmnydivide (DBPROCESS *dbproc, DBMONEY *m1, DBMONEY *m2, DBMONEY *quotient) |
| Divide two DBMONEY values. | |
| RETCODE | dbmnydown (DBPROCESS *dbproc, DBMONEY *amount, int divisor, int *remainder) |
| Divide a DBMONEY value by a positive integer. | |
| RETCODE | dbmnyinc (DBPROCESS *dbproc, DBMONEY *amount) |
| Add $0.0001 to a DBMONEY value. | |
| RETCODE | dbmnyinit (DBPROCESS *dbproc, DBMONEY *amount, int trim, DBBOOL *negative) |
| Prepare a DBMONEY value for use with dbmnyndigit(). | |
| RETCODE | dbmnymaxneg (DBPROCESS *dbproc, DBMONEY *amount) |
| Get maximum negative DBMONEY value supported. | |
| RETCODE | dbmnymaxpos (DBPROCESS *dbproc, DBMONEY *amount) |
| Get maximum positive DBMONEY value supported. | |
| RETCODE | dbmnyminus (DBPROCESS *dbproc, DBMONEY *src, DBMONEY *dest) |
| Negate a DBMONEY value. | |
| RETCODE | dbmnymul (DBPROCESS *dbproc, DBMONEY *m1, DBMONEY *m2, DBMONEY *prod) |
| Multiply two DBMONEY values. | |
| RETCODE | dbmnyndigit (DBPROCESS *dbproc, DBMONEY *mnyptr, DBCHAR *digit, DBBOOL *zero) |
| Get the least significant digit of a DBMONEY value, represented as a character. | |
| RETCODE | dbmnyscale (DBPROCESS *dbproc, DBMONEY *amount, int multiplier, int addend) |
| Multiply a DBMONEY value by a positive integer, and add an amount. | |
| RETCODE | dbmnysub (DBPROCESS *dbproc, DBMONEY *m1, DBMONEY *m2, DBMONEY *difference) |
| Subtract two DBMONEY values. | |
| RETCODE | dbmnyzero (DBPROCESS *dbproc, DBMONEY *dest) |
| Set a DBMONEY value to zero. | |
| RETCODE dbmny4add | ( | DBPROCESS * | dbproc, | |
| DBMONEY4 * | m1, | |||
| DBMONEY4 * | m2, | |||
| DBMONEY4 * | sum | |||
| ) |
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. |
| int dbmny4cmp | ( | DBPROCESS * | dbproc, | |
| DBMONEY4 * | m1, | |||
| DBMONEY4 * | m2 | |||
| ) |
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. |
| RETCODE dbmny4copy | ( | DBPROCESS * | dbproc, | |
| DBMONEY4 * | src, | |||
| DBMONEY4 * | dest | |||
| ) |
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. |
| RETCODE dbmny4divide | ( | DBPROCESS * | dbproc, | |
| DBMONEY4 * | m1, | |||
| DBMONEY4 * | m2, | |||
| DBMONEY4 * | quotient | |||
| ) |
Divide two DBMONEY4 values.
| dbproc | contains all information needed by db-lib to manage communications with the server. | |
| m1 | dividend. | |
| m2 | divisor. | |
| quotient | output: result of computation. |
| SUCCEED | usually. | |
| FAIL | a parameter is NULL. |
| RETCODE dbmny4minus | ( | DBPROCESS * | dbproc, | |
| DBMONEY4 * | src, | |||
| DBMONEY4 * | dest | |||
| ) |
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. |
| RETCODE dbmny4mul | ( | DBPROCESS * | dbproc, | |
| DBMONEY4 * | m1, | |||
| DBMONEY4 * | m2, | |||
| DBMONEY4 * | prod | |||
| ) |
Multiply two DBMONEY4 values.
| dbproc | contains all information needed by db-lib to manage communications with the server. | |
| m1 | first operand. | |
| m2 | other operand. | |
| prod | output: result of computation. |
| SUCCEED | usually. | |
| FAIL | a parameter is NULL. |
| RETCODE dbmny4sub | ( | DBPROCESS * | dbproc, | |
| DBMONEY4 * | m1, | |||
| DBMONEY4 * | m2, | |||
| DBMONEY4 * | diff | |||
| ) |
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. |
| RETCODE dbmny4zero | ( | DBPROCESS * | dbproc, | |
| DBMONEY4 * | dest | |||
| ) |
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. |
| RETCODE dbmnyadd | ( | DBPROCESS * | dbproc, | |
| DBMONEY * | m1, | |||
| DBMONEY * | m2, | |||
| DBMONEY * | sum | |||
| ) |
Add two DBMONEY 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 | Always. |
| int dbmnycmp | ( | DBPROCESS * | dbproc, | |
| DBMONEY * | m1, | |||
| DBMONEY * | m2 | |||
| ) |
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. |
| RETCODE dbmnycopy | ( | DBPROCESS * | dbproc, | |
| DBMONEY * | src, | |||
| DBMONEY * | dest | |||
| ) |
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. |
| RETCODE dbmnydec | ( | DBPROCESS * | dbproc, | |
| DBMONEY * | amount | |||
| ) |
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. |
| RETCODE dbmnydivide | ( | DBPROCESS * | dbproc, | |
| DBMONEY * | m1, | |||
| DBMONEY * | m2, | |||
| DBMONEY * | quotient | |||
| ) |
Divide two DBMONEY values.
| dbproc | contains all information needed by db-lib to manage communications with the server. | |
| m1 | dividend. | |
| m2 | divisor. | |
| quotient | output: result of computation. |
| SUCCEED | Always. |
| RETCODE dbmnydown | ( | DBPROCESS * | dbproc, | |
| DBMONEY * | amount, | |||
| int | divisor, | |||
| int * | remainder | |||
| ) |
Divide a DBMONEY value by a positive integer.
| dbproc | contains all information needed by db-lib to manage communications with the server. | |
| amount | address of a DBMONEY structure. | |
| divisor | of amount. | |
| remainder | output: modulo of integer division. |
| SUCCEED | Always. |
| RETCODE dbmnyinc | ( | DBPROCESS * | dbproc, | |
| DBMONEY * | amount | |||
| ) |
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. |
| RETCODE dbmnyinit | ( | DBPROCESS * | dbproc, | |
| DBMONEY * | amount, | |||
| int | trim, | |||
| DBBOOL * | negative | |||
| ) |
Prepare a DBMONEY value for use with dbmnyndigit().
| dbproc | contains all information needed by db-lib to manage communications with the server. | |
| amount | address of a DBMONEY structure. | |
| trim | number of digits to trim from amount. | |
| negative | output: TRUE if amount < 0. |
| SUCCEED | Always. |
| RETCODE dbmnymaxneg | ( | DBPROCESS * | dbproc, | |
| DBMONEY * | amount | |||
| ) |
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. |
| RETCODE dbmnymaxpos | ( | DBPROCESS * | dbproc, | |
| DBMONEY * | amount | |||
| ) |
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. |
| RETCODE dbmnyminus | ( | DBPROCESS * | dbproc, | |
| DBMONEY * | src, | |||
| DBMONEY * | dest | |||
| ) |
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. |
| RETCODE dbmnymul | ( | DBPROCESS * | dbproc, | |
| DBMONEY * | m1, | |||
| DBMONEY * | m2, | |||
| DBMONEY * | prod | |||
| ) |
Multiply two DBMONEY values.
| dbproc | contains all information needed by db-lib to manage communications with the server. | |
| m1 | first operand. | |
| m2 | other operand. | |
| prod | output: result of computation. |
| SUCCEED | Always. |
| RETCODE dbmnyndigit | ( | DBPROCESS * | dbproc, | |
| DBMONEY * | mnyptr, | |||
| DBCHAR * | digit, | |||
| DBBOOL * | zero | |||
| ) |
Get the least significant digit of a DBMONEY value, represented as a character.
| dbproc | contains all information needed by db-lib to manage communications with the server. | |
| mnyptr | input the money amount, and output: mnyptr divided by 10. | |
| digit | the character value (between '0' and '9') of the rightmost digit in mnyptr. | |
| zero | output: TRUE if mnyptr is zero on output, else FALSE. |
| SUCCEED | Always. |
| RETCODE dbmnyscale | ( | DBPROCESS * | dbproc, | |
| DBMONEY * | amount, | |||
| int | multiplier, | |||
| int | addend | |||
| ) |
Multiply a DBMONEY value by a positive integer, and add an amount.
| dbproc | contains all information needed by db-lib to manage communications with the server. | |
| amount | starting amount of money, also holds output. | |
| multiplier | amount to multiply amount by. | |
| addend | amount to add to amount, after multiplying by multiplier. |
| SUCCEED | Always. |
| RETCODE dbmnysub | ( | DBPROCESS * | dbproc, | |
| DBMONEY * | m1, | |||
| DBMONEY * | m2, | |||
| DBMONEY * | difference | |||
| ) |
Subtract two DBMONEY values.
| dbproc | contains all information needed by db-lib to manage communications with the server. | |
| m1 | first operand. | |
| m2 | other operand, subtracted from m1. | |
| difference | output: result of computation. |
| SUCCEED | Always. |
| RETCODE dbmnyzero | ( | DBPROCESS * | dbproc, | |
| DBMONEY * | dest | |||
| ) |
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. |
1.5.4