Skip to content

Conversation

@yutaro-sakamoto
Copy link
Contributor

@yutaro-sakamoto yutaro-sakamoto commented Oct 11, 2024

Due to this pull request, the compiler converts some EVALUATE statements to switch statements instead of if statements in order to improve the readability of generate Java files.
The compiler converts switch statements that satisfies all conditions descibed in the following list to switch satatements.

  • The EVALUATE statement evaluates a single integer variable
  • Each WHEN clause except for WHEN OTHER specifies a single integer or a single variable whose level number is 78
    • Each integer is between -2147483648 and 2147483647
  • No integer is specified by two or more WHEN clauses
  • No WHEN clause uses THRU
  • No WHEN clause uses NOT

@yutaro-sakamoto yutaro-sakamoto merged commit 676f9f2 into opensourcecobol:develop Oct 11, 2024
124 checks passed
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