Re: [fpc-pascal] TStringList.Put calls change even if value hasn't changed

2013-02-11 Thread Michael Van Canneyt
On Mon, 11 Feb 2013, Bart wrote: On 2/11/13, Michael Van Canneyt wrote: I am aware of this. But the impact of changing it is impossible to guess, so it is not subject to change. Which is fine by me. I just wondered, and now I'm informed... And with that new knowledge I can improve my co

Re: [fpc-pascal] TStringList.Put calls change even if value hasn't changed

2013-02-11 Thread Bart
On 2/11/13, Michael Van Canneyt wrote: > I am aware of this. > > But the impact of changing it is impossible to guess, so it is not > subject to change. > Which is fine by me. I just wondered, and now I'm informed... And with that new knowledge I can improve my code. Thanks. Bart _

Re: [fpc-pascal] TStringList.Put calls change even if value hasn't changed

2013-02-11 Thread Michael Van Canneyt
On Mon, 11 Feb 2013, Bart wrote: On 2/10/13, Michael Van Canneyt wrote: You expect wrong. No supposition is made whatsoever on the value. Every write in the list triggers a change. This is how delphi implements it, and that is how we implemented it. That's why I mentioned I might be horr

Re: [fpc-pascal] TStringList.Put calls change even if value hasn't changed

2013-02-11 Thread Bart
On 2/10/13, Michael Van Canneyt wrote: > You expect wrong. No supposition is made whatsoever on the value. > Every write in the list triggers a change. > > This is how delphi implements it, and that is how we implemented it. That's why I mentioned I might be horribly wrong. So Delphi compatibili

Re: [fpc-pascal] TStringList.Put calls change even if value hasn't changed

2013-02-10 Thread Michael Van Canneyt
On Sun, 10 Feb 2013, Bart wrote: When you do something like StringList1.Strings[Index] := Value it calls TStringList.Put(). I would expect that if Value = Strings[Index] then nothing happens, and no Change or Changing are called. You expect wrong. No supposition is made whatsoever on the v

[fpc-pascal] TStringList.Put calls change even if value hasn't changed

2013-02-10 Thread Bart
When you do something like StringList1.Strings[Index] := Value it calls TStringList.Put(). I would expect that if Value = Strings[Index] then nothing happens, and no Change or Changing are called. Muttatis mutandis for PutObject. Procedure TStringList.Put(Index: Integer; const S: string); beg