Announcement

Collapse
No announcement yet.

Defines in BC text comparison?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Defines in BC text comparison?

    Hi,

    is there a way to use the information of previous defines in a text file, e. g.

    FIRST FILE:

    Define ipDriveReady = IN0
    ...
    if (ipDriveReady) then
    ...

    SECOND FILE
    ...
    if (IN0) then
    ...


    Actually, both files are equal, but text comparison shows of course a difference.

    Regards,

    Max

  • #2
    Hello,

    BC4 does not support scanning a file for a "DEFINE" statement within the text file and then treating the definition as equal text. Beyond Compare 3/4 Pro does have a feature called Text Replacements, where you could define a rule such as "ipDriveReady" = "IN0", but this definition done manually by the user and not by scanning the file. Text Replacements are found in the Text Compare's Session Settings dialog, Replacements tab; and child session settings can be applied to a parent Folder Compare. If you think this might work for you and would like more details or need help setting this up, just let us know.
    Aaron P Scooter Software

    Comment


    • #3
      Hallo Aaron,

      thank you. This seems to be exactly what I was looking for.

      But I have another question regarding text replacements: having the two replacements "Sub"->"#" and "()"->" " (unfortunately, BC does not allow an empty string here), I would expect the following lines to be equal:

      LEFT SIDE: Sub repos_m()
      RIGHT SIDE: #repos_m

      But the empty brakes are still marked as a difference. What can I change to make it completely equal?

      Regards,

      Max

      Comment


      • #4
        Hello,

        A Text Replacement does not support matching on blank. For this type of replacement, maybe a RegEx like:
        Sub (.*)\(\)
        =
        #$1
        Aaron P Scooter Software

        Comment

        Working...
        X