<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=2899118</guid>
        <pubDate>Mon, 23 May 2011 10:10:49 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=2899118</link>
        <description><![CDATA[leo: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=239811&view=findpost&p=2898865'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>MBo &#064; <time class="tag-quote__quoted-time" datetime="2011-05-23T08:32:19+04:00">23.05.11, 04:32</time></span><div class='quote '><strong class='tag-b'>Ultraplayer</strong><br>
ЗдОрово соптимизировал </div></div><br>
Да уж - хоть бы Exchange(i,j) использовал:<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">N:=List.Count-1;</div><div class="code_line">for i:=0 to N div 2 do List.Exchange(i,N-i);</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>leo</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=2898865</guid>
        <pubDate>Mon, 23 May 2011 04:32:19 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=2898865</link>
        <description><![CDATA[MBo: <strong class='tag-b'>Ultraplayer</strong><br>
ЗдОрово соптимизировал   :crazy:]]></description>
        <author>MBo</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=2898864</guid>
        <pubDate>Mon, 23 May 2011 04:25:12 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=2898864</link>
        <description><![CDATA[Ultraplayer: На самом деле - всё гораздо проще.  ;) <br>
Идея в том, что если мы имеем хотя бы обычную сортировку, то ничто нам не мешает просто повернуть уже отсортированный лист.<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">procedure ReverseList(var List: TStringList);</div><div class="code_line">var</div><div class="code_line">&nbsp;&nbsp;TmpList: TStringList;</div><div class="code_line">&nbsp;&nbsp;I: Integer;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;TmpList := TStringList.Create;</div><div class="code_line">&nbsp;&nbsp;for I := List.Count -1 DownTo 0 do</div><div class="code_line">&nbsp;&nbsp; &nbsp;TmpList.Append(List[I]);</div><div class="code_line">&nbsp;&nbsp;List.Assign(TmpList);</div><div class="code_line">&nbsp;&nbsp;TmpList.Free;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">...</div><div class="code_line">procedure TForm1.Button1Click(Sender: TObject);</div><div class="code_line">var</div><div class="code_line">&nbsp;&nbsp;List: TStringList;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;List := TStringList.Create;</div><div class="code_line">&nbsp;&nbsp;List.Append(&#39;a&#39;);</div><div class="code_line">&nbsp;&nbsp;List.Append(&#39;v&#39;);</div><div class="code_line">&nbsp;&nbsp;List.Append(&#39;e&#39;);</div><div class="code_line">&nbsp;&nbsp;List.Append(&#39;z&#39;);</div><div class="code_line">&nbsp;&nbsp;List.Sort;</div><div class="code_line">&nbsp;&nbsp;ReverseList(List);</div><div class="code_line">&nbsp;&nbsp;Memo1.Lines.Assign(List);</div><div class="code_line">&nbsp;&nbsp;List.Free;</div><div class="code_line">end;</div></ol></div></div></div></div>]]></description>
        <author>Ultraplayer</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981798</guid>
        <pubDate>Mon, 09 Jun 2008 09:06:48 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981798</link>
        <description><![CDATA[Felan: Тьфу-ты :) Прогнал :)<br>Переклинило меня что-то что это вывод уже. :)]]></description>
        <author>Felan</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981565</guid>
        <pubDate>Mon, 09 Jun 2008 05:06:24 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981565</link>
        <description><![CDATA[RuSA: [quote=Felan,1212986535,1981559]Строку<br>
Цитата (mopsik @ Вчера, 17:56)<br>
for I := 1 to (CountItem - 1) do<br>
<br>
Надо заменить на строку<br>
<br>
for I := (CountItem - 1) downto 1 do[/quote]<br>
<br>
[/quote]<br>
  :no: Сортировка выполняется не этим циклом, а последующим вызовом MyList.Sort.]]></description>
        <author>RuSA</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981559</guid>
        <pubDate>Mon, 09 Jun 2008 04:42:15 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981559</link>
        <description><![CDATA[Felan: [quote=mopsik,1212926208,1981206]А мне оказалось надо по убыванию.[/quote]<br>
<br>
Ну в таком случае все гораздо тривиальнее&#33; :) Строку<br>
[quote=mopsik,1212926208,1981206]for I := 1 to (CountItem - 1) do[/quote]<br>
Надо заменить на строку<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">for I := (CountItem - 1) downto 1 do[/quote]</div></ol></div></div></div></div><br>
<br>
ЗЫЖ Кстати, индексы начинаяют с нуля...]]></description>
        <author>Felan</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981290</guid>
        <pubDate>Sun, 08 Jun 2008 14:27:17 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981290</link>
        <description><![CDATA[mopsik: Ой, исправила.....исправила&#33; <br>
Получилось....получилось&#33; :lol:  :lol:  :lol:  :lol:  :lol:  :lol:  :lol:  :lol:  :lol:  :lol:  :lol: <br>
<strong class='tag-b'>Демо</strong> спасибо большое]]></description>
        <author>mopsik</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981289</guid>
        <pubDate>Sun, 08 Jun 2008 14:26:36 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981289</link>
        <description><![CDATA[Демо: <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">type</div><div class="code_line">&nbsp;&nbsp;TForm1=...</div><div class="code_line">&nbsp;&nbsp; &nbsp;...</div><div class="code_line">&nbsp;&nbsp; &nbsp;...</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">&nbsp;</div><div class="code_line">[B]function MySort(List: TStringList; Index1, Index2: Integer): Integer;[/B]</div><div class="code_line">&nbsp;</div><div class="code_line">implementation</div><div class="code_line">&nbsp;</div><div class="code_line">[B]function MySort(List: TStringList; Index1, Index2: Integer): Integer;[/B]</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;if List[Index1]&#60;List[Index2] then</div><div class="code_line">&nbsp;&nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;Result := 1;</div><div class="code_line">&nbsp;&nbsp; &nbsp;Exit;</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">&nbsp;&nbsp;if List[Index1]=List[Index2]</div><div class="code_line">&nbsp;&nbsp; &nbsp;then Result := 0</div><div class="code_line">&nbsp;&nbsp; &nbsp;else Result := -1;</div><div class="code_line">end;</div></ol></div></div></div></div><br>
<br>
И никаких <strong class='tag-b'>stdcall</strong>&#33;]]></description>
        <author>Демо</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981286</guid>
        <pubDate>Sun, 08 Jun 2008 14:19:18 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981286</link>
        <description><![CDATA[mopsik: <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">unit Unit1;</div><div class="code_line">&nbsp;</div><div class="code_line">interface</div><div class="code_line">&nbsp;</div><div class="code_line">uses</div><div class="code_line">&nbsp;&nbsp;...;</div><div class="code_line">&nbsp;</div><div class="code_line">type</div><div class="code_line">&nbsp;&nbsp;...</div><div class="code_line">&nbsp;&nbsp; &nbsp;function MySort(List: TStringList; Index1, Index2: Integer): Integer; stdcall;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">implementation</div><div class="code_line">...</div><div class="code_line">function TForm1.MySort(List: TStringList; Index1, Index2: Integer): Integer;stdcall;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;if List[Index1]&#60;List[Index2] then</div><div class="code_line">&nbsp;&nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;Result := 1;</div><div class="code_line">&nbsp;&nbsp; &nbsp;Exit;</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">&nbsp;&nbsp;if List[Index1]=List[Index2]</div><div class="code_line">&nbsp;&nbsp; &nbsp;then Result := 0</div><div class="code_line">&nbsp;&nbsp; &nbsp;else Result := -1;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">procedure TForm1.SortStringGrid(var GenStrGrid: TStringGrid; ThatCol: Integer);</div><div class="code_line">//тут у меня сама процедура создания листа , занесения данных &nbsp;и ........сортировка</div><div class="code_line">MyList &nbsp; &nbsp; &nbsp; &nbsp;:= TStringList.Create;</div><div class="code_line">&nbsp;&nbsp;MyList.Sorted := False;</div><div class="code_line">&nbsp;&nbsp;try</div><div class="code_line">&nbsp;&nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;for I := 1 to (CountItem - 1) do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;MyList.Add(GenStrGrid.Rows[I].Strings[ThatCol] + TheSeparator +</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GenStrGrid.Rows[I].Text);</div><div class="code_line">Mylist.CustomSort(mysort);</div></ol></div></div></div></div>А что неправильно?]]></description>
        <author>mopsik</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981279</guid>
        <pubDate>Sun, 08 Jun 2008 14:00:00 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981279</link>
        <description><![CDATA[Демо: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=239811&view=findpost&p=1981251'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>mopsik &#064; <time class="tag-quote__quoted-time" datetime="2008-06-08T13:01:46+00:00">08.06.08, 13:01</time></span><div class='quote '>Incompatible types: regular procedure and method pointer</div></div><br>
<br>
А ты что, MySort методом класса сделала?]]></description>
        <author>Демо</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981251</guid>
        <pubDate>Sun, 08 Jun 2008 13:01:46 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981251</link>
        <description><![CDATA[mopsik: Товарищи, я делаю, как вы говорите, но у меня на строчке Mylist.CustomSort(mysort)ругается:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">Incompatible types: regular procedure and method pointer</div></ol></div></div></div></div>]]></description>
        <author>mopsik</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981240</guid>
        <pubDate>Sun, 08 Jun 2008 12:47:14 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981240</link>
        <description><![CDATA[Демо: <strong class='tag-b'>Selya</strong><br>
см. реализацию InternalCompareText. Менее эффективный код в данном случае.]]></description>
        <author>Демо</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981235</guid>
        <pubDate>Sun, 08 Jun 2008 12:37:37 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981235</link>
        <description><![CDATA[Selya: Метод Sort объекта класса TStringList по умочанию сортирует во возрастанию.<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>Sorts the strings in the list in ascending order.</div></div><br>
Если посмотреть как это реализовано:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function StringListCompareStrings(List: TStringList; Index1, Index2: Integer): Integer;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;Result := List.CompareStrings(List.FList^[Index1].FString,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;List.FList^[Index2].FString);</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">procedure TStringList.Sort;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;CustomSort(StringListCompareStrings);</div><div class="code_line">end;</div></ol></div></div></div></div><br>
То можно легко догадаться, что для сортировки по убыванию надо переписать:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function StringListCompareStringsDesc(List: TStringList; Index1, Index2: Integer): Integer;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;Result := List.CompareStrings(List.FList^[Index2].FString,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;List.FList^[Index1].FString);</div><div class="code_line">end;</div></ol></div></div></div></div><br>
И уже потом использовать метод CustomSort:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">var</div><div class="code_line">&nbsp;&nbsp;Strs: TStringList;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;Strs := TStringList.Create;</div><div class="code_line">&nbsp;&nbsp;try</div><div class="code_line">&nbsp;&nbsp; &nbsp;Strs.Add(...);</div><div class="code_line">&nbsp;&nbsp; &nbsp;...</div><div class="code_line">&nbsp;&nbsp; &nbsp;Strs.CustomSort(StringListCompareStringsDesc);</div><div class="code_line">&nbsp;&nbsp; &nbsp;...</div><div class="code_line">&nbsp;&nbsp;finally</div><div class="code_line">&nbsp;&nbsp; &nbsp;Strs.Free;</div><div class="code_line">&nbsp;&nbsp;end;</div></ol></div></div></div></div>]]></description>
        <author>Selya</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981230</guid>
        <pubDate>Sun, 08 Jun 2008 12:30:25 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981230</link>
        <description><![CDATA[Демо: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=239811&view=findpost&p=1981226'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>mopsik &#064; <time class="tag-quote__quoted-time" datetime="2008-06-08T12:25:07+00:00">08.06.08, 12:25</time></span><div class='quote '>а что такое Index1, Index2?</div></div><br>
<br>
Метод CustomSort позволяет осуществить порьзовательскую сортировку. В функцию для сортировки передаются индексы строк в TStrings (Index1 и Index2), которые нужно сравнить.<br>
Открой справку Delphi.]]></description>
        <author>Демо</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981226</guid>
        <pubDate>Sun, 08 Jun 2008 12:25:07 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981226</link>
        <description><![CDATA[mopsik: а что такое Index1, Index2?]]></description>
        <author>mopsik</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981214</guid>
        <pubDate>Sun, 08 Jun 2008 12:08:17 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981214</link>
        <description><![CDATA[Демо: <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function MySort(List: TStringList; Index1, Index2: Integer): Integer;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;if List[Index1]&#60;List[Index2] then</div><div class="code_line">&nbsp;&nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;Result := 1;</div><div class="code_line">&nbsp;&nbsp; &nbsp;Exit;</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">&nbsp;&nbsp;if List[Index1]=List[Index2]</div><div class="code_line">&nbsp;&nbsp; &nbsp;then Result := 0</div><div class="code_line">&nbsp;&nbsp; &nbsp;else Result := -1;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">...</div><div class="code_line">Mylist.CustomSort(MySort);</div></ol></div></div></div></div>]]></description>
        <author>Демо</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981206</guid>
        <pubDate>Sun, 08 Jun 2008 11:56:48 +0000</pubDate>
        <title>Сортировка TStringList по убыванию</title>
        <link>https://forum.sources.ru/index.php?showtopic=239811&amp;view=findpost&amp;p=1981206</link>
        <description><![CDATA[mopsik: Мне надо отсортированить TStringList. Нашла в DRKB3 Вот как: <br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">MyList &nbsp; &nbsp; &nbsp; &nbsp;:= TStringList.Create;</div><div class="code_line">&nbsp;&nbsp;MyList.Sorted := False;</div><div class="code_line">&nbsp;&nbsp;try</div><div class="code_line">&nbsp;&nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;for I := 1 to (CountItem - 1) do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;MyList.Add(GenStrGrid.Rows[I].Strings[ThatCol] + TheSeparator +</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GenStrGrid.Rows[I].Text);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Mylist.Sort;</div></ol></div></div></div></div><br>
Но тут сортирует по возрастанию. А мне оказалось надо по убыванию. Пожскажите пожалуйста. Может есть какой параметр типа Asc, desc]]></description>
        <author>mopsik</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      </channel>
      </rss>
	