Printing Charts

Dan McCabe fp at mccabes.us
Mon Sep 13 21:31:08 PDT 2004


I am attempting to print a chart.  I use an array for each line of the
chart, mapped to dummy variables.

I have run through the debugger and find that each calculation is being
done correctly and the fields hold the correct value.  However, the report
prints 0's for the base figures (annual), and then my secondary (weekly)
amounts get a /D0 error.

Code is below.  The code isn't completed yet, I'm still in the testing
phase.  Any help appreciated.

Thanks,

Dan McCabe
Taunton Police Department
Taunton, MA


::'****************LONG NAME VARIABLE DECLARATION******************:
::DECLARE Base(9,.2,g):
::DECLARE BeenThere(1,yesno,g):
::DECLARE FifteenYR(4,.3,g):
::DECLARE FiveYR(4,.3,g):
::DECLARE Hazard(4,.3,g):
::DECLARE TenYR(4,.3,g):
::DECLARE TwentyYR(4,.3,g):
::DECLARE Twenty5YR(4,.3,g):
::DECLARE Twenty9YR(4,.3,g):
::DECLARE YearFormula(7,.4,g):
::'****************END LONG NAME DECLARATIONS**********************:
thetop:::
:BeenThere = "Y":goto DoneIt:
::ll = "LONGEVITY"                        'Label for pay incentive library:
::lookup rates = payincent@  k=ll   i=A -nx:
:not rates:errorbox "FATAL ERROR -- CAN'T GET LONGEVITY RATES":
:rates(3) ne "Y":getnext rates:
:rates(5) = "5YRLONG":FiveYR = rates(2) / "100"; getnext rates:
:rates(5) = "10YRLONG":TenYR = rates(2)  / "100"; getnext rates:
:rates(5) = "15YRLONG":FifteenYR = rates(2) / "100"; getnext rates:
:rates(5) = "20YRLONG":TwentyYR = rates(2) / "100"; getnext rates:
:rates(5) = "25YRLONG":Twenty5YR = rates(2) / "100"; getnext rates:
:rates(5) = "29YRLONG":Twenty9YR = rates(2) / "100"; getnext rates:
::ll = "HAZARD":
::lookup rates = payincent@  k=ll   i=A -nx:
:not rates:errorbox "FATAL ERROR - UNABLE TO GET HAZARD PAY INFO":
:rates(5) = "HAZARD":Hazard = rates(2) / "100":
::BeenThere = "Y":
DoneIt:10 ne "Y":end:
:YearFormula gt "":goto skip1:
::yr = getenv("FISYR"):
:isleap(yr) ne "1":YearFormula  = "365" / "7":
:isleap(yr) eq "1":YearFormula  = "366" / "7":
skip1::Base = (2 * Hazard) + 2:
:1 = "P7 ":goto chief:
:1 = "P6 ":goto captain:
:1 = "P5 ":goto lieuten:
:1 = "P4 ":goto sgt:
:1 = "P3 ":goto ptlm:
::end:
::dim chief1(6)(9,.2,g):aa:
::dim chief2(6)(8,.2,g):ag:
::dim capt1(6)(9,.2,g):ba:
::dim capt2(6)(8,.2,g):bg:
::dim lt1(6)(9,.2,g):ca:
::dim lt2(6)(8,.2,g):cg:
::dim sgt1(6)(9,.2,g):da:
::dim sgt2(6)(8,.2,g):dg:
::dim ptlm1(6)(9,.2,g):ea:
::dim ptlm2(6)(8,.2,g):eg:
::      '*****************SUB ROUTINES******************:
chief:::
::chief1["1"] = Base * FiveYr:
::chief1["2"] = Base * TenYr:
::chief1["3"] = Base * FifteenYr:
::chief1["4"] = Base * TwentyYr:
::chief1["5"] = Base * Twenty5Yr:
::chief1["6"] = Base * Twenty9Yr:
::chief2["1"] = Base * FiveYr / YearFormula:
::chief2["2"] = Base * TenYr / YearFormula:
::chief2["3"] = Base * FifteenYr / YearFormula:
::chief2["4"] = Base * TwentyYr  / YearFormula:
::chief2["5"] = Base * Twenty5Yr / YearFormula:
::chief2["6"] = Base * Twenty9Yr / YearFormula:
::print:
::end:
captain:::
::capt1["1"] = Base * FiveYr:
::capt1["2"] = Base * TenYr:
::capt1["3"] = Base * FifteenYr:
::capt1["4"] = Base * TwentyYr:
::capt1["5"] = Base * Twenty5Yr:
::capt1["6"] = Base * Twenty9Yr:
::capt2["1"] = Base * FiveYr / YearFormula:
::capt2["2"] = Base * TenYr / YearFormula:
::capt2["3"] = Base * FifteenYr / YearFormula:
::capt2["4"] = Base * TwentyYr  / YearFormula:
::capt2["5"] = Base * Twenty5Yr / YearFormula:
::capt2["6"] = Base * Twenty9Yr / YearFormula:
::end:
lieuten:::
sgt:::
ptlm:::


More information about the Filepro-list mailing list