Показать сообщение отдельно
  #4  
Старый 08.06.2012, 18:00
Аватар для cotseec
cotseec cotseec вне форума
Активный
 
Регистрация: 16.07.2008
Сообщения: 353
Версия Delphi: D7,TDE06,RAD09
Репутация: 1443
По умолчанию

Код:
procedure TForm2.Button1Click(Sender: TObject);
var
  tmpList:TStringList;
  i:integer;
begin
  tmpList:=TStringList.Create;
  tmpList.Delimiter:=' ';
  tmpList.Sorted:=true;
  tmpList.Duplicates:=dupIgnore;
  tmpList.DelimitedText:=Memo1.Lines.Text;

  Memo1.Clear;
  for i:=0 to tmpList.Count - 2 do
    Memo1.Lines.Add(tmpList[tmpList.Count-1]+tmpList.Delimiter+tmpList[i]);

  tmpList.Free;
end;

З.Ы. свойство Lines в TMemo также имеет тип TStrings
__________________
Понять, что хочет заказчик - бесценно, ведь он платит MasterCard
Ответить с цитированием