No announcement yet.

small suggestion for delphi rules comparison

  • Filter
  • Time
  • Show
Clear All
new posts

  • small suggestion for delphi rules comparison

    in the delphi rules configuration, text between { and } is set to be marked as "unimportant".

    i can see why this was done because { } is USUALLY used for marking comments in delphi.

    HOWEVER, { } is also used very frequently also to indicate conditional compilation lines, in the same way that #ifdef is used in c/c++.

    i'd like to suggest that this makes it probably a bad idea to mark such differences in {} as unimportant.

    if you wanted to get clever you could mark differences in {} as unimportant UNLESS the first character after the { is a $, since that's what signifies a directive, for example:

    {$IFDEF DELPHI_6_UP} using RTLConsts {$ENDIF}

  • #2
    Re: small suggestion for delphi rules comparison

    You can make this work correctly by editing your Delphi rules. Load a pair of Delphi files and then select Edit Current Rules from the Tools menu. In the new dialog switch to the Importance tab, and then click the New button in the String Literals area. A smaller dialog will open. Change the Category to Regular Expression and enter this as the expression: \{\$.*\}

    I thought we'd already changed this in the Default rules, but it looks like not. We'll get it fixed in the next release.
    Zoë P Scooter Software