Memo1.Lines???

From: Wayne Burrows (wayne.burrows_at_xtra.co.nz)
Date: 12/22/03


Date: Tue, 23 Dec 2003 09:53:55 +1300

What could be wrong with this code?

 i := 0;
 While Pos('<t>',ThisStr)>0 do
 begin
   AStr := LeftStr(ThisStr,Pos('<t>',ThisStr)-1);
   Memo1.Lines[i] := AStr;
   ThisStr := RightStr(ThisStr,Length(ThisStr)-Pos('<t>',ThisStr)-2);
   inc(i);
 end;
 Memo1.Lines[i] := ThisStr;

ThisStr begins with the value something like 'one<t>two<t>three'

AStr takes the values 'one' 'two' correctly

But Memo1 only ends up with the first line 'one'

TIA

Wayne