Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Students are able to compile code that is longer than 80 columns with fixed-form #74

Open
KTSnowy opened this issue Jul 29, 2022 · 5 comments
Assignees

Comments

@KTSnowy
Copy link
Contributor

KTSnowy commented Jul 29, 2022

I thought that gnuCOBOL's default option maintained the fixed-form column length limit.

@KTSnowy
Copy link
Contributor Author

KTSnowy commented Jul 29, 2022

@0xE282B0 do you know if cobol-check has any options to maintain the column limit?

@0xE282B0
Copy link
Member

We found out that the line limits are not hit because cobolcheck reformats the code.

Before cobolcheck:

         IF FUNCTION MOD ( WS-YEAR, 4 ) = 0 AND FUNCTION MOD ( WS-YEAR, 100 ) > 0 OR FUNCTION MOD ( WS-YEAR, 400 ) = 0 
            MOVE 1 TO WS-RESULT
         ELSE
            MOVE 0 TO WS-RESULT.

After cobolcheck:

           IF FUNCTION MOD ( WS-YEAR, 4 ) = 0 AND FUNCTION MOD (                
               WS-YEAR, 100 ) > 0 OR FUNCTION MOD ( WS-YEAR, 400 ) = 0          
            MOVE 1 TO WS-RESULT                                                 
         ELSE                                                                   
            MOVE 0 TO WS-RESULT.      

@0xE282B0
Copy link
Member

@KTSnowy
Copy link
Contributor Author

KTSnowy commented Jul 29, 2022

But that would be easy to change.

Would it be alright if you make a temporary fork to test it?
If it works we can keep using the fork for our track.

@0xE282B0
Copy link
Member

Sure, just need to see when I can get to that.

@0xE282B0 0xE282B0 self-assigned this Jul 29, 2022
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

No branches or pull requests

2 participants