OI4WG 3.5 Urgent fix required please... (OpenInsight Specific)
At 17 FEB 1998 07:21:02AM Andrew Gebbett wrote:
The following applies to OI4WG version 3.5.
To display numbers to two decimal places we use the "MD20," conversion throughout our applications. Whilst this conversion is OK in 99% of cases, unfortunately it gives incorrect results where a number is returned from a calculation in standard form. An easily reproducable example is given below:
A=7.4326843E-2"
B=OCONV(ICONV(A,"MD2"),"MD2,")
C=OCONV(A,"MD20,")
B gives the correct answer of 0.07 but C returns 7.43.
Could you please issue a patch since I assume this should be an easy fix. For us to change all our code would be a huge task!
Regards,
Andrew Gebbett
CSSP UK
At 17 FEB 1998 09:29AM Skip Tinnell wrote:
Andrew,
Interestingly, when the quotes are removed from A, C returns the correct answer, i.e.: A=7.4326843E-2 instead of A=7.4326843E-2".
At 17 FEB 1998 09:42AM Steve C. wrote:
I'm running into the same problem. I calculate percentages.
OI gives the same answers to both of these.
3155/111060= 2.84 (instead of .0284)
315500/111060= 2.84 (correct)
At 17 FEB 1998 10:30AM Steve C. wrote:
This is the code as a dictionary symbolic that
computes the wrong percentage as noted above.
TEMP_GROSS={GROSS_SALES}
IF TEMP_GROSS=" THEN TEMP_GROSS=0
IF TEMP_GROSS0 THEN
@ANS={AB_SALES}/{GROSS_SALES}
END ELSE
@ANS=0
END
.
Steve C.
At 17 FEB 1998 07:07PM Andrew P McAuley wrote:
Interesting - I suspect a side effect of the changes to allow 0.0 to be seen as different to .0. Seems like "don't quote me on that" (it's all eggs bacon beans and a fried slice) is the order of the day.
World Leaders in all things RevSoft
PS Free Insulated Sprezz coffee mug to the first person to guess correctly what the the quote above is from….