Start and end comment block using same character

Start and end comment block using same character

2
NewbieNewbie
2

    Jun 22, 2006#1

    I program in a language that only has comment blocks, no single line comments, and the start and end comment symbol is the same - an @ symbol.

    It appears that UltraEdit's syntax highlighting cannot handle having the same symbol for start and end comment - is this correct?

    Steve

    6,686585
    Grand MasterGrand Master
    6,686585

      Jun 22, 2006#2

      Yes, it looks so. UE gets a little bit confused and the block comment highlighting fails.

      You have 3 options now:

      1) Send a feature request email to IDM support and ask for support of identical block comment on/off strings.

      2) Adapt your comment writing style to the capabilities of UE and write for example always @> at start of a block comment and <@ at the end of a block comment and use these 2 strings in the wordfile too.

      3) If your language does not support multi-line strings, but normal strings with "..." or '?' within a line only, you can use the string highlighting feature as block comment highlighting and highlight the strings with marker characters.


      For 3) use following:

      /L20"Language Name" String Chars = @ EnableMLS File Extensions = ???
      /Delimiters = " 'tab@
      /Marker Characters = """''"
      /C8"Strings"
      ""
      ''

      You can add additional delimiter characters. I have written here just the 5 characters you need absolutely.

      Disadvantages: Code folding on block comments is not possible with this workaround and an escape character for strings like "this is a double quote \" in a string" cannot be used too.


      If the language is not a non-puplic internal company language, can you post the name of the language?

      Maybe an other user needs it also and uses the forum search for the answer of the question: "How to setup the wordfile to highlight the block comments of language ??? correctly?"
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Jun 22, 2006#3

        Thanks very much for the reply. It's an internal company language, but it resembles Algol 68 - http://en.wikipedia.org/wiki/ALGOL_68 - which also uses the same symbol to start and end comments, but not @ in that case.

        We never use multi-line strings, so your method 3) works brilliantly, thank you. I don't fully understand how it works - I've only just started using UltraEdit - but it does, so I can carry on trying UltraEdit.

        Thanks again!