A colleague of mine spotted the weirdest XE6 bug so far.

A colleague of mine spotted the weirdest XE6 bug so far.

On an TMS TAdvStringGrid

1.

for i := 0 to Grid.RowCount – 1

 do Grid.RowHeights[i] := rh;

2.

for i := 0 to Grid.RowCount – 1

do begin

  Grid.RowHeights[i] := rh;

end;

Example 1 failed at setting all lines, Example 2 worked.

Does anyone know of an XE6  QC or QP that is related to “missing” begin/end enclosures?

12 thoughts on “A colleague of mine spotted the weirdest XE6 bug so far.


  1. I kinda think you deserve that given your code formatting 😛


    Could RowHeights property be non-trivial and this has something to do with temporaries I wonder…


  2. It took me 25 years to rethink my formatting for readability, and it seems to works for the team. Conditions on one or more lines, statements on one or more following lines – after a do/then (begin/end) – never on the same line. Don’t diss it until you’ve tried it 😉


    I don’t even have a theory to why this should go wrong.


  3. Lars Fosdal We have one style per coder… Which at least makes it easy to know who to pester when you’re wondering some piece of code is doing 😛


    Back on topic, I’d love to see the asm output of the two.


  4. interesting bug, I use begin-end even for one liners — habit developed in the past few years — I wonder what you mean by failed to insert all lines, how many lines is example #1 missing?

Leave a Reply