Ran out of edit time, gang. Corrected version follows. ----
To elaborate on parse-time vs run-time errors in qp2, ---------------------- b := (S*Sxy - Sx*Sy)/(S*Sxx - Sx*Sx); if b = 0 then print symbol,"b was zero with j: ",j; endif; pctgain := abs((b1/b) -1); --------------------
fails with a parse-time div by 0 error, even though commenting out the pctgain line shows b isn't 0 at run time.
The parse-time error is fixed by ----------- b := .0000001+(S*Sxy - Sx*Sy)/(S*Sxx - Sx*Sx); // kludge -----------
or by enclosing pctgain in if ... endif. ------------- b := (S*Sxy - Sx*Sy)/(S*Sxx - Sx*Sx); if b != 0 then pctgain := abs((b1/b) -1); endif; -------------
It is also amusing that, though numdays is rejected at parse-time in Jan's ------ NumDays:= -(daysloaded -1); println NumDays, Max(0, NumDays, hi); ------- negating NumDays by ------------- println NumDays, Max(0, -NumDays, hi); ----------------- works fine, but it always returns zero. That is, +255 is accepted by Max, but it punts with zero since it can't predict the future ;)
Can you easily fix these parse-time check errors, Gary?
Bob
|