Menu

#23 cobol.loader.picture_parser problem with precision using (#) syntax

Release 4.4.6
closed
None
2015-06-09
2015-03-24
RHarris
No

picture_parser function does not currently increment value of precision when decimal is true and c == '('

I think adding the following line before out.append( (irpt-1)*out[-1] ) would be appropriate:

if decimal: precision += irpt

Discussion

  • RHarris

    RHarris - 2015-04-28

    correction...the above fix isn't correct.

    the line SHOULD be:
    if decimal: precision = irpt

     
  • Steven F. Lott

    Steven F. Lott - 2015-05-06

    To be slightly more general.

    if decimal: precision += irpt

    Not sure of PIC 9(5)V99(2) would ever actually happen. But.

     
  • Steven F. Lott

    Steven F. Lott - 2015-05-06
    • Milestone: Release 4.4 --> Release 4.4.5
     
  • Steven F. Lott

    Steven F. Lott - 2015-05-06
    • assigned_to: Steven F. Lott
     
  • RHarris

    RHarris - 2015-05-06

    well, that's what I thought, thus my initial recommended fix, however, precision+= irpt didn't work but precision = irpt did...I didn't do additional debugging to understand why...

     
  • Steven F. Lott

    Steven F. Lott - 2015-05-06
    • status: open --> pending
     
  • Steven F. Lott

    Steven F. Lott - 2015-06-09

    Added unit test cases. Looks to be fixed.

     
  • Steven F. Lott

    Steven F. Lott - 2015-06-09
    • status: pending --> closed
     

Log in to post a comment.