#37 clear() incorrectly implemented for numbers

closed-fixed
nobody
None
5
2010-08-22
2010-08-22
No

clear(-1) and clear(1) always sets numeric to -2147483648 and 2147483647 respectively.

It does not take number encoding into account. i.e. when you clear a USHORT with -1 and 1 it should be 0 and 65535 respectively.

Clarion2Java models all numerics as 32bit signed integers. At key points it will enforce encoding (i.e. with OVER() attribute). But not all.

A number of areas system will yield different results. i.e. arithmetic that relies on binary overflow. Should not be a big deal because such logic does not belong in business software!

But clear is certainly a problem. if you clear a SHORT and that SHORT is a DB record column which is backed with a smallint SQL type, then it will not work.

Discussion

  • Andrew Barnham

    Andrew Barnham - 2010-08-22
    • status: open --> closed-fixed
     
  • Andrew Barnham

    Andrew Barnham - 2010-08-22

    Fixed in SVN head

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks