• Login
Community
  • Login

COBOL syntax and wrap strings

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 3 Posters 692 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 Mar 12, 2024, 3:06 PM Mar 12, 2024, 3:04 PM

    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.

    A P 2 Replies Last reply Mar 12, 2024, 3:29 PM Reply Quote 0
    • A
      Alan Kilborn @RiaanPretoriusRIP
      last edited by Alan Kilborn Mar 12, 2024, 3:31 PM Mar 12, 2024, 3:29 PM

      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 Mar 13, 2024, 6:37 AM Reply Quote 3
      • P
        PeterJones @RiaanPretoriusRIP
        last edited by PeterJones Mar 12, 2024, 4:27 PM Mar 12, 2024, 3:30 PM

        @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 Mar 13, 2024, 6:37 AM

          @Alan-Kilborn

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

          1 Reply Last reply Reply Quote 3
          • M mpheath referenced this topic on Mar 17, 2024, 3:33 AM
          3 out of 4
          • First post
            3/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors