Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    COBOL Comment lines are not displaying correctly if there is a character in Column 6

    Help wanted · · · – – – · · ·
    7
    10
    493
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Will Lamers
      Will Lamers last edited by

      Hello team -

      For introduction I have been a COBOL programmer for over twenty years.

      Comment lines for COBOL do not display correctly in Notepad++ if there are any characters in column 6. By definition a comment line is any line with an asterisk (*) or slash (/) in the indicator area (column 7) of the line, and should not be dependent on any preceding characters.

      (https://www.ibm.com/support/knowledgecenter/en/SS6SG3_4.2.0/com.ibm.entcobol.doc_4.2/PGandLR/ref/rlfmtcom.htm)

      The first three lines below are displaying comments correctly, but the fourth and fifth lines are displaying as active code rather than a comment. The sixth line and others following are again displaying correctly. The only time that the comment line is not formatted correctly is when there is a character in Column 6 and a comment indicator in Column 7.

      CobolComment1.PNG

      Eventually the formatting gives up:

      CobolComment2.PNG

      From this point on, for the next 11,000+ lines, there is no formatting at all.

      This program does compile, so the highlighting does not affect the actual code, but it is a frustration that the highlighting of Comment Lines goes funky.

      Would it be possible to correct the definition of a COBOL comment line? Is there somewhere I can change the highlighting myself to match the actual COBOL definition?

      Thanks in advance!

      Will

      PeterJones Ekopalypse Alan Kilborn 3 Replies Last reply Reply Quote 0
      • PeterJones
        PeterJones @Will Lamers last edited by

        @Will-Lamers ,

        I get the same behavior in Notepad++. So I tried in SciTE (Notepad++ uses the Scintilla editor component, which is also in charge of syntax highlighting; the SciTE editor is the Scintilla’s testbed editor using the Scintilla editor component). It has the same bug, which means the bug is in the codebase of the Scintilla library, rather than something specific in Notepad++.

        To get a Scintilla bug fixed in Notepad++:

        1. you’ll have to file a bug with Scinitlla (start here), then wait for them to fix it

        2. once/if Scintilla fixes the COBOL lexer, then you will have to ask the Notepad++ developers (start here) to update to the new version of Scintilla, and wait for that to be done

        Sorry that I don’t have better news for you.

        1 Reply Last reply Reply Quote 1
        • Ekopalypse
          Ekopalypse @Will Lamers last edited by

          Seems there is some interest for Cobol lately.

          PeterJones 1 Reply Last reply Reply Quote 1
          • PeterJones
            PeterJones @Ekopalypse last edited by

            @Ekopalypse said in COBOL Comment lines are not displaying correctly if there is a character in Column 6:

            Seems there is some interest for Cobol lately.

            Possibly related to current events?

            1 Reply Last reply Reply Quote 2
            • Robert Plagge
              Robert Plagge last edited by

              I noticed it helps when you add a space between whatever is before the leading asterisk, and then add a > after.

              * Notepad++ "claims" the next line is not a comment even though it is.
              * Therefore, Notepad++ does not mark it as a comment.
              1234* I really am a comment.
              
              * Notepad++ thinks the next line is a comment, so it marks accordingly
              1234 *> I be a comment.
              

              But I agree, the language definition should be updated to correct the defect.

              PeterJones 1 Reply Last reply Reply Quote 0
              • PeterJones
                PeterJones @Robert Plagge last edited by

                @Robert-Plagge said in COBOL Comment lines are not displaying correctly if there is a character in Column 6:

                But I agree, the language definition should be updated to correct the defect.

                As I described in May, the problem is in the Scintilla library, which is not under Notepad++-developer’s control. The update process needs to start on the Scintilla end. Until someone starts that process by filing a bug report with Scintilla, nothing will happen.

                1 Reply Last reply Reply Quote 0
                • Alan Kilborn
                  Alan Kilborn @Will Lamers last edited by

                  @Will-Lamers

                  Peter said:

                  Sorry that I don’t have better news for you.

                  And the news gets worse, regarding :

                  you will have to ask the Notepad++ developers (start here) to update to the new version of Scintilla, and wait for that to be done

                  This type of update is sadly done very infrequently. You may be waiting a long time.

                  1 Reply Last reply Reply Quote 0
                  • Xuân-Thơ HOÀNG
                    Xuân-Thơ HOÀNG last edited by

                    This bug is still not fixed in Scinitlla/Notepad++ :(

                    I prefer using Notepad++ to read COBOL code in multi-tabs because of its lightweight.

                    Alan Kilborn mpheath 2 Replies Last reply Reply Quote 0
                    • Alan Kilborn
                      Alan Kilborn @Xuân-Thơ HOÀNG last edited by

                      @xuân-thơ-hoàng said in COBOL Comment lines are not displaying correctly if there is a character in Column 6:

                      This bug is still not fixed in Scinitlla/Notepad++

                      Have you freshened a similar complaint on the Scintilla site?

                      1 Reply Last reply Reply Quote 0
                      • mpheath
                        mpheath @Xuân-Thơ HOÀNG last edited by mpheath

                        @xuân-thơ-hoàng

                        An open bug report at Scintilla:

                        #1893 Bug comments Language Cobol columns 7

                        Note:

                        Maintenance of particular languages depends on contributions from users of that language. Reporting a problem here may result in a fix but its possible that no fix is forthcoming or it may be some time before a fix.

                        If you can contribute, then perhaps it can be fixed.

                        Lexilla now handles lexers so contribute there.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright © 2014 NodeBB Forums | Contributors