What do you expect this to do ?
What do you mean when you say there is a bug?
I have tried this on universe, with a few CRT's added, and all looks ok to me.
Les.

-----Original Message-----
From: Chris van O [mailto:[EMAIL PROTECTED]
Sent: 08 October 2004 07:30
To: [EMAIL PROTECTED]
Subject: [U2] Why is this statement failing? (UniVerse)


Ive found a bug that has been in production for many years, but has just 
started to cause problems....but I dont know exactly why...

      DEC.OFFSET = 10000
      FOR I = 1 TO 20
         FOR J = 1 TO 99
            K = I "R0%2" : '.' : J "R0%2"
            PRX = K
            IF INT(PRX*DEC.OFFSET)=DEC.OFFSET*PRX THEN
               PRINT K : ' PASSED'
            END ELSE
               PRINT K : ' FAILED'
            END
         NEXT J
      NEXT I
     
Ive fixed it by saying .....

          IF (PRX*DEC.OFFSET)+0 = DEC.OFFSET*PRX THEN   

But I still cant dont know why it was failing....or why this hasnt been a problem in 
10 years with over 50,000 transactions a day. The data are strings 
passed from a client app that usually look like:
80.03
120.25
100.01
12002.4
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


This e-mail and any attachments are confidential and intended solely for the use of 
the addressee only. If you have received this message in error, you must not copy, 
distribute or disclose the contents; please notify the sender immediately and delete 
the message.
This message is attributed to the sender and may not necessarily reflect the view of 
Travis Perkins plc or its subsidiaries (Travis Perkins). Agreements binding Travis 
Perkins may not be concluded by means of e-mail communication.
E-mail transmissions are not secure and Travis Perkins accepts no responsibility for 
changes made to this message after it was sent. Whilst steps have been taken to ensure 
that this message is virus free, Travis Perkins accepts no liability for infection and 
recommends that you scan this e-mail and any attachments.
Part of Travis Perkins plc. Registered Office: Lodge Way House, Lodge Way, Harlestone 
Road, Northampton, NN5 7UG.
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to