Skip to content

Conversation

@yutaro-sakamoto
Copy link
Contributor

This pull request modifies the CobolNumericField to fix subtract statements against PIC 9 variables. The most important changes include the addition of a method to check for positive or negative zero, an adjustment in the subtraction logic, and the inclusion of new test cases.

Enhancements to CobolNumericField class:

  • Modified displaySubInt method to adjust the byte value if it is greater than or equal to 0x70. (libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java)
  • Added isPositiveZeroOrNegativeZero method to check if the field is either positive or negative zero, and updated addInt method to use this check. (libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data/CobolNumericField.java)

Additions to test cases:

  • Created fix-subtract.at to test various subtraction scenarios in COBOL programs. (tests/misc.src/fix-subtract.at)

@yutaro-sakamoto yutaro-sakamoto merged commit 8f2e0b6 into opensourcecobol:develop Nov 10, 2024
124 checks passed
@yutaro-sakamoto yutaro-sakamoto mentioned this pull request Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant