Hi Everyone,
I'm trying to debug a problem with a perl application that calls some c programs to do text editing.
BATCH_JV_CSH_MAX is used to test the maximum value of an amount field. It currently indicates an error if the amount is over 99,999,999.99. Is is supposed to accept values up to 999,999,999.99. Well, that is what is stated in the documentation, anyway.
Here it is in the include file:
#define PROJ_SZ 6
#define REF_SZ 9
#define DESC_SZ 22
#define TRAN_AMT_MAX 9999999999e0
#define BATCH_AMT_MAX 9999999999e0
#define BATCH_JV_CSH_MAX 99999999999e0
#define BATCH_CNT_MAX 99999
I don't know yet how the program works. It probably strips out any value other than a number and concats the characters. I want to know what the 'e0' at the end of the amount means before I continue. I did a text search in a few c programming books in Safari before I decided to ask this group.
This value is printed out in an error message so '999999999' is more meaningful than 1e9
The value is used like this:
/* Batch total amount 1 - debit dollars */
/* Check for overflow */
if (fabs(get_tot_amt1()) > BATCH_JV_CSH_MAX)
{
fprintf(stderr, "\n*** Error: Transaction debit amount overflow\n");
fprintf(stderr, "\n*** Maximum expected: %.0f\n",
BATCH_JV_CSH_MAX);
return (FALSE);
}
sprintf(in_batch_sum.batch_debit_amt, "%011.0f", get_tot_amt1());
get_tot_amt1() gets a value tot_amt1 which has been calculated in another c program. It is "static double".
Yup, I have lots of work to do. This is part of a process that reads in a space delimited record and writes out a fixed format record.
Thanks. Cathy