Please enable JavaScript to view this site.
These programs will add together the parameters one to five supplied to the program and pass the result back in parameter one. The default is to pass the result back as a two decimal numeric field of length eleven (eight numerics the decimal point and two decimals). The number of characters returned before the decimal point is always eight but you may alter the number of decimals by passing the value of 1 – 5 in parameter six.
If you alter the number of decimals returned then the return value length will change accordingly [ 8 – 15]. The difference between COBADD and COBADDR is that COBADDR will use rounding whilst COBADD will just truncate to the correct number of decimals.
Note: If the number you pass into the program has a minus sign e.g. 1.10- then this number will be subtracted. If the end result is a negative number then a minus sign will be returned.
Parameter |
In |
Len |
Out |
Len |
PARM1 |
Value 1 |
21 |
Result Return length depends upon value specified in PARM6 e.g. xxxxxxxx.xxxxx- xxxxxxxx.xxxx- xxxxxxxx.xxx- xxxxxxxx.xx- xxxxxxxx.x- xxxxxxxx- |
15 |
PARM2 |
Value 2 |
21 |
- |
|
PARM3 |
Value 3 |
21 |
- |
|
PARM4 |
Value 4 |
21 |
- |
|
PARM5 |
Value 5 |
21 |
- |
|
PARM6 |
Number of decimals (0 - 5) or Blank for default of 2 |
|
- |
|