Master the power of the Replace Dialog - Delphi 232

Поділитися
Вставка
  • Опубліковано 15 гру 2024

КОМЕНТАРІ • 3

  • @Alien426
    @Alien426 7 місяців тому +1

    If you don't want to bother with the lazy/greedy distinction (it's just a question mark after the quantifier to make it non-greedy), the most useful thing in my opinion is to use a negated character class in place of the dot-star:
    .\FieldByName\('{[^']}'\)
    You capture any characters that are *not* a single quote, because you know that it denotes the end of the string.

  • @ErikOdinsvej
    @ErikOdinsvej 7 місяців тому +1

    Hi unrelated to you video, I have a question, that I have ask several person working with Delphi, here it goes : when making a 'for x:=1 to 10 do' loop and you making a trace of your step, then it start with 10 (not 1)??? and continue to 1 - not as you will think - what happens here ? - work with Delphi pascal for long time but are long away from you level. - hope you have time to answer this. thanks Erik

    • @codegearguru
      @codegearguru  7 місяців тому +1

      I've not able to reproduce this, but I presume that it will be a performance thing. I'm assuming that x is not being referenced in the for loop, so it it doesn't matter what the value of x is. It probably optimises better counting down from 10 to 1 (or 9 to 0) as it can do a "Jump if Zero" (JZ) or the reverse (Jump Not Zero JNZ), but just a guess.