Highlighting comments (whole line)

Highlighting comments (whole line)

344
MasterMaster
344

    Nov 24, 2004#1

    Hi all

    Is it possible to REALLY define a (one line) comment-highlighting (comment sign is #) ?

    example 1: highlighted ok
    #this comment is fully highlighted ok

    example 2: highlights from # on to the right :-(((
    if $(#) > 0 then ......

    I saw a workaround of using "** # " (without quotes) in te methods section, but this does not highlight things like this:
    # this comment is not highlighted because of space after comment

    The rule is: if comment sign is first sign, highlight all.
    I can live with things like this:
    if a < b then #this comment might not be highlighted

    Any solutions ?

    Thanks, Alex

    6,603548
    Grand MasterGrand Master
    6,603548

      Nov 24, 2004#2

      There are several options to specify the line comment more specific - see help of UltraEdit about Syntax highlighting.

      Solution 1:
      Adding Line Comment Valid Columns = [1] to the language definition line will help you (your rule is fullfilled).

      Solution 2:
      Adding Line Comment Preceding Chars = [~0-9a-z()] to the language definition line will highlight all your examples correct.

      But the best thing for languages, where a single line comment is also a valid operator, is to extend the single line comment character by yourself to a string. For examples write always #-> when you write a line comment and highlighting is much easier (and also finding comments).
      Best regards from an UC/UE/UES for Windows user from Austria

      344
      MasterMaster
      344

        Nov 25, 2004#3

        Hi Mofi,

        you got it ! Thanks a lot.

        Alex (p.s. greets from germany :-)