I have come across a bug in HOLD FORMAT EXL2K FORMULA, in release 7.7.02, when the COMPUTE involves the INT() function.
TABLE FILE CAR
PRINT SEATS AND COMPUTE
NUM1/D12.4 =RDNORM('D12.2')*2-1;
ON TABLE HOLD
END
TABLE FILE HOLD
PRINT NUM1
COMPUTE
NUM2/D12.4= IF(NUM1 GT 0)
THEN (NUM1+.05) - DMOD(( NUM1+.05),.1,'D12.2')
ELSE (NUM1-.05) + DMOD((-NUM1+.05),.1,'D12.2');
NUM3/D12.4= IF(NUM1 GT 0)
THEN INT((NUM1+.05)*10)/10
ELSE INT((NUM1-.05)*10)/10;
DIFF/D12.4=NUM2-NUM1;
BY TOTAL NUM1 NOPRINT
ON TABLE PCHOLD FORMAT EXL2K FORMULA
END
In 7.1.6, correct Excel formulae are generated:
for num1: =IF($A2>0, $A2+0.05-(MOD(($A2+0.05), 0.1)), $A2-0.05+(MOD((-$A2+0.05), 0.1))) for num2: =IF($A2>0, TRUNC((($A2+0.05)*10))/10, TRUNC((($A2-0.05)*10))/10)
But in 7.7.02, the formulas generated are:
for num1: =IF(($A2>0), ($A2+0.05)-(MOD(($A2+0.05), 0.1)), ($A2-0.05)+(MOD((-$A2+0.05), 0.1))) for num2: =IF(($A2>0), ($A2+0.05)*10/10, ($A2-0.05)*10/10)
and the values generated for num2 are incorrect. TABLE is essentially ignoring the INT(...), and treating it as simply parentheses (...), which it discards as redundant.
Has anyone else come across this?This message has been edited. Last edited by: Kerry,
- Jack Gross WF through 8.1.05
May 10, 2011, 03:13 PM
Kerry
Hi Jack,
I checked with our technicals and was suggested that, to check and/or confirm if this is an issue to be fixed, please contact Customer Support Services and open a case regarding this issue. You may either call at 1-800-736-6130, or access online at InfoResponse.
Cheers,
Kerry
Kerry Zhan Focal Point Moderator Information Builders, Inc.