Alt line comments don't work for me

Alt line comments don't work for me

9
NewbieNewbie
9

    Nov 09, 2005#1

    I have attempted to specifiy alternate line comments in my wordfile so that line comments starting with --# (i.e. two dashes and a hash mark)would be colored differently that lines starting with -- (i.e. two dashes only). However it doesn't work - they both get the same color. In my wordfile I have:

    /L12"Ada95" Line Comment = --# Line Comment Alt = -- NoCASE String Chars = "' File Extensions = ada ads adb

    I've tried exchanging the line comment and the alt line comment but it doesn't work either way.

    I would appreciate any hints on how to make this work or a confirmation that this feature is broken in UltraEdit (I can make it work in TextPad).

    Thanks,
    Britt

    6,683583
    Grand MasterGrand Master
    6,683583

      Re: Alt line comments don't work for me

      Nov 10, 2005#2

      Yes, it is possible to highlight these two line comments different, because block comments are interpreted as line comments, if no block comment off string is specified.

      Code: Select all

      /L12"Ada95" Line Comment Num = 3--  Block Comment On Alt = --# Nocase String Chars = "' File Extensions = ada ads adb
      Note: "Nocase" and not "NoCASE" and the line comment must be "-- " and not "--" or the alternative line comment will be always interpreted also as normal line comment. The language definition above has 2 spaces betwenn "3--" and "Block"!

      How this will highlight on a small example:

      command --not highlighted line comment because no space
      command -- correct highlighted line comment
      command --#correct highlighted alternative line comment
      command --# also correct highlighted alternative line comment
      Best regards from an UC/UE/UES for Windows user from Austria

      9
      NewbieNewbie
      9

        Nov 10, 2005#3

        Thank you! Your solution works great and after reading the help section on block comments I see that it mentions the effect of omitting the block comment off string.

        I would prefer to not require the space after -- for normal comments, but I assume the space is required to distinguish the two comment types.

        Britt