RE: Float error, OnLine 7.23
Posted in 1998
On 15 Apr 98 at 9:55, Leffler, Jonathan wrote: > > ---------- > From: Christian Winterhager[SMTP:christian.winterhager@orbit.de] > Sent: Wednesday, April 15, 1998 1:10 AM > > We have moved to OnLine 7.23 UC6 (from Online 5.01), 4GL 6.05 UD1 > (RDS), and all our 4GL-Programs now stop at the following statements: > > DEFINE x FLOAT, y DECIMAL(6,2) > > LET y = 0 > LET x = y > > After this, we get Error 1223. > Very mysterious! Is it a bug in this 4GL-Version? Or an OnLine-Buf of > 7.23? > > The problem is in I4GL, not in OnLine per se. > > The error is 'value will not fit in a FLOAT', which leads one to question > what value is in y. Given that you're using p-code rather than c-code, it > is more difficult to debug what's going on. Do you have c-code? If so, > does it work? What about if you add 'WHENEVER ANY ERROR STOP' to it (which > is how p-code runs)? If the c-code also breaks with the W.A.E.S set, then > you could send me the c-code which is generated for the statements above > enclosed in MAIN and END MAIN - a minimal test case. > > Yours, > Jonathan Leffler (jleffler@visa.com) #include <bother.ms-exchange.h> I don't know if this has anything to do with it, but we have noticed different behaviors in some cases with decimal types using or not using a decimal point. LET y = 0 then using y in a comparison (or something) yields a different result than LET y = 0.00 Seems as if it shouldn't, but 4GL isn't the only language I've encountered this in. rc