Community
    • Login

    COBOL syntax and wrap strings

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 508 Views
    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.
    • R
      RiaanPretoriusRIP
      last edited by RiaanPretoriusRIP

      COBOL allows long text variables to be split over two or more lines.

      Example

                  DISPLAY MESSAGE BOX
                    "The following process must be applied to Earnings, Deduct
            -       "ions and Company Contributions separately."
      

      It uses a “-” sign in column 7 to indicate a continuation. Note that the first line does not end with a quote to indicate end of the string.

      Notepad++ get confused from the continuation and will show all the following lines as part of the string.

      Alan KilbornA PeterJonesP 2 Replies Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @RiaanPretoriusRIP
        last edited by Alan Kilborn

        Note to other readers: “wrap” in this context does NOT refer to Notepad++'s View menu Word wrap setting!

        @RiaanPretoriusRIP

        This is a lexing problem. Lexing is handled by third-party software, and thus is best reported to Scintilla’s Lexilla component issues site; I’ve never had occasion to visit that site before myself, but it appears to be HERE.

        EDIT from the future: In Peter’s post below, he points out that this may be something that Lexilla can do, it just isn’t enabled by Notepad++.

        R 1 Reply Last reply Reply Quote 3
        • PeterJonesP
          PeterJones @RiaanPretoriusRIP
          last edited by PeterJones

          @RiaanPretoriusRIP ,

          Notepad++ does not expose any options to control that, as far as I am aware (though I am not a Cobol expert). But it’s not something that Notepad++ developers can add, unless the Lexilla library (which is what Notepad++ uses for syntax highlighting) provides that as an option for Cobol lexing.

          If Lexilla does provide that option, then xconfig for Notepad++ using the PythonScript plugin will allow you to find and set that option.

          If such an option does not exist, you would have to put in a feature request with the Lexilla project, and it would eventually trickle into Notepad++ (if accepted/implemented, of course).

          —

          update: I used this script to list the lexer properties, and didn’t see any properties for the Cobol lexer. So I believe you would have to put in a feature request with Lexilla. Sorry.

          1 Reply Last reply Reply Quote 4
          • R
            RiaanPretoriusRIP @Alan Kilborn
            last edited by

            @Alan-Kilborn

            Thank you. I did add the request on the Scintilla site.

            1 Reply Last reply Reply Quote 3
            • mpheathM mpheath referenced this topic on
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors