<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[QUIK -> DDE &mdash; Сортировка массива]]></title>
	<link rel="self" href="https://quik2dde.ru/extern.php?action=feed&amp;tid=84&amp;type=atom" />
	<updated>2014-01-25T02:51:12Z</updated>
	<generator>PunBB</generator>
	<id>https://quik2dde.ru/viewtopic.php?id=84</id>
		<entry>
			<title type="html"><![CDATA[Re: Сортировка массива]]></title>
			<link rel="alternate" href="https://quik2dde.ru/viewtopic.php?pid=508#p508" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Table [1] =&quot;40&quot;
Table [2] =&quot;20&quot;
Table [3] =&quot;30&quot;
Table [4] =&quot;5&quot;

function comp(w1,w2)
    if (tonumber(w2) &gt; tonumber(w1)) then
        return true
    end
end

table.sort(Table,comp)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[swerg]]></name>
				<uri>https://quik2dde.ru/profile.php?id=78</uri>
			</author>
			<updated>2014-01-25T02:51:12Z</updated>
			<id>https://quik2dde.ru/viewtopic.php?pid=508#p508</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Сортировка массива]]></title>
			<link rel="alternate" href="https://quik2dde.ru/viewtopic.php?pid=507#p507" />
			<content type="html"><![CDATA[<p>оказывается числа в таблице идут как string. как быть дальше не знаю</p>]]></content>
			<author>
				<name><![CDATA[zyanov]]></name>
				<uri>https://quik2dde.ru/profile.php?id=87</uri>
			</author>
			<updated>2014-01-24T21:20:54Z</updated>
			<id>https://quik2dde.ru/viewtopic.php?pid=507#p507</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Сортировка массива]]></title>
			<link rel="alternate" href="https://quik2dde.ru/viewtopic.php?pid=506#p506" />
			<content type="html"><![CDATA[<p>Вроде вы все написали, даже не знаю что же не получилось-то? )</p><div class="codebox"><pre><code>Table = {}
Table [1] =40
Table [2] =20
Table [3] =30

table.sort(Table)</code></pre></div><p>Второй аргумент в table.sort() можно не указывать, если таблица &quot;простая&quot;, т.е. ее элементы напрямую сравнимы.</p>]]></content>
			<author>
				<name><![CDATA[swerg]]></name>
				<uri>https://quik2dde.ru/profile.php?id=78</uri>
			</author>
			<updated>2014-01-24T18:58:17Z</updated>
			<id>https://quik2dde.ru/viewtopic.php?pid=506#p506</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Сортировка массива]]></title>
			<link rel="alternate" href="https://quik2dde.ru/viewtopic.php?pid=504#p504" />
			<content type="html"><![CDATA[<p>Подскажите, как реализовать сортировку по возрастанию ?<br />Имеется это<br />Table {}<br />Table [1] =40<br />Table [2] =20<br />Table [3] =30 </p><p>Применить нагугленное не могу что то :&nbsp; table.sort(Table, function(a, return a.NumberValue &gt; b.NumberValue end)</p>]]></content>
			<author>
				<name><![CDATA[zyanov]]></name>
				<uri>https://quik2dde.ru/profile.php?id=87</uri>
			</author>
			<updated>2014-01-24T16:03:30Z</updated>
			<id>https://quik2dde.ru/viewtopic.php?pid=504#p504</id>
		</entry>
</feed>
