<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Форум QUIK [тема: Получение параметров из таблиц в переменные]</title>
		<link>http://forum.quik.ru</link>
		<description>Новое в теме Получение параметров из таблиц в переменные форума  на сайте Форум QUIK [forum.quik.ru]</description>
		<language>ru</language>
		<docs>http://backend.userland.com/rss2</docs>
		<pubDate>Fri, 17 Apr 2026 01:39:04 +0300</pubDate>
		<item>
			<title>Получение параметров из таблиц в переменные</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message46209/topic5506/">Получение параметров из таблиц в переменные</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			вместо:<br />if tblAsk==nil &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then Ask=0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else Ask=tonumber(tblAsk.param_value) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end &nbsp;<br />--------------<br />пишите проще:<br />if tblAsk &nbsp; then &nbsp;Ask=tonumber(tblAsk.param_value) &nbsp; &nbsp;end &nbsp;<br />----------------------------------<br />где используете Ask <br />тоже пишите<br />if Ask then .... &nbsp;end<br />-----------------<br />В итоге вы не будете тратить время на расчеты если Ask=nil ,<br /> а в Вашем случает Вы тратите время на расчеты, если Ask=0,<br /> либо ставите такое же условие для нуля <br /> &nbsp; <br />
			<i>13.06.2020 10:02:26, nikolz.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message46209/topic5506/</link>
			<guid>http://forum.quik.ru/messages/forum10/message46209/topic5506/</guid>
			<pubDate>Sat, 13 Jun 2020 10:02:26 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Получение параметров из таблиц в переменные</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message45812/topic5506/">Получение параметров из таблиц в переменные</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Спасибо <br />
			<i>01.06.2020 12:30:25, Сирануш.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message45812/topic5506/</link>
			<guid>http://forum.quik.ru/messages/forum10/message45812/topic5506/</guid>
			<pubDate>Mon, 01 Jun 2020 12:30:25 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Получение параметров из таблиц в переменные</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message45808/topic5506/">Получение параметров из таблиц в переменные</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Нет, в отличии от getParamEx, эти функции возращают таблицы. Данные в них будут, т.к. это данные по счету, данные по позициям и т.д.<br />надо только проверять, что получен вообще результат и он корректен.<br /><noindex><a href="http://luaq.ru/getDepoEx.html" target="_blank" rel="nofollow">http://luaq.ru/getDepoEx.html</a></noindex> <br />
			<i>01.06.2020 11:34:04, Nikolay.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message45808/topic5506/</link>
			<guid>http://forum.quik.ru/messages/forum10/message45808/topic5506/</guid>
			<pubDate>Mon, 01 Jun 2020 11:34:04 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Получение параметров из таблиц в переменные</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message45807/topic5506/">Получение параметров из таблиц в переменные</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Спасибо. А по getMoneyEx(FIRM_ID, CLIENT_CODE, TAG, CURR_CODE,LIMIT_KIND) &nbsp;и &nbsp;getDepoEx(FIRM_ID, CLIENT_CODE, SEC_CODE, ACCOUNT ,LIMIT_KIND) тоже надо проверять находятся ли они в потоке или как? <br />
			<i>01.06.2020 11:05:47, Сирануш.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message45807/topic5506/</link>
			<guid>http://forum.quik.ru/messages/forum10/message45807/topic5506/</guid>
			<pubDate>Mon, 01 Jun 2020 11:05:47 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Получение параметров из таблиц в переменные</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message45773/topic5506/">Получение параметров из таблиц в переменные</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Вместо проверок на nil достаточно написать<br />local tblAsk = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;getParamEx(CLASS_CODE, &nbsp;SEC_CODE, &quot;OFFER&quot;) or 0<br /><br />Но, по хорошему, надо проверить есть ли данный параметр в потоке данных. Иначе будет не ясно - это ошибка получения данных с сервера или они просто не заказаны.<br />Проверить можо так:<br />getParamEx(CLASS_CODE, SEC_CODE, info_string).result == &#39;1&#39; <br />
			<i>30.05.2020 09:31:53, Nikolay.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message45773/topic5506/</link>
			<guid>http://forum.quik.ru/messages/forum10/message45773/topic5506/</guid>
			<pubDate>Sat, 30 May 2020 09:31:53 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Получение параметров из таблиц в переменные</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message45769/topic5506/">Получение параметров из таблиц в переменные</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			День добрый! Подскажите знающие люди, правильно ли я пытаюсь получить параметры таблиц &nbsp;в переменные. Заранее спасибо.<br />local tblAsk = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;getParamEx(CLASS_CODE, &nbsp;SEC_CODE, &quot;OFFER&quot;)<br />local tblBid = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;getParamEx(CLASS_CODE, &nbsp;SEC_CODE, &quot;BID&quot;)<br />	 local tblStatus = &nbsp; &nbsp; &nbsp; getParamEx(CLASS_CODE, &nbsp;SEC_CODE, &quot;STATUS&quot;) &nbsp; <br />local tblMinLot = &nbsp; &nbsp; &nbsp; getParamEx(CLASS_CODE, &nbsp;SEC_CODE, &quot;LOTSIZE&quot;)	 	 <br />local tblBalance = &nbsp; &nbsp; &nbsp;getMoneyEx(FIRM_ID, CLIENT_CODE, TAG, CURR_CODE,LIMIT_KIND)	 <br />local tblTotalLot = &nbsp; &nbsp; getDepoEx(FIRM_ID, CLIENT_CODE, SEC_CODE, ACCOUNT ,LIMIT_KIND)	 <br />	 local tblMinStepPrice = getParamEx(CLASS_CODE, &nbsp;SEC_CODE, &quot;SEC_PRICE_STEP&quot;)	<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />if tblAsk==nil &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then Ask=0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else Ask=tonumber(tblAsk.param_value) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end &nbsp; <br />if tblBid==nil &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then Bid=0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else Bid=tonumber(tblBid.param_value) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end &nbsp;<br />	 if tblStatus==nil &nbsp; &nbsp; &nbsp; then Status=0 &nbsp; &nbsp; &nbsp; else Status=tonumber(tblStatus.param_value) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end &nbsp;<br />if tblMinLot==nil &nbsp; &nbsp; &nbsp; then MinLot=0 &nbsp; &nbsp; &nbsp; else MinLot=tonumber(tblMinLot.param_value) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end &nbsp; &nbsp;<br />if tblBalance==nil &nbsp; &nbsp; &nbsp;then Balance=0 &nbsp; &nbsp; &nbsp;else Balance=tonumber(tblBalance.currentbal) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end &nbsp; <br />if tblTotalLot==nil &nbsp; &nbsp; then TotalLots=0 &nbsp; &nbsp;else TotalLots=tonumber(tblTotalLot.currentbal) &nbsp; &nbsp; &nbsp; &nbsp; end &nbsp; &nbsp;<br />	 if tblMinStepPrice==nil then MinStepPrice=0 else MinStepPrice=tonumber(tblMinStepPrice.param_value) end &nbsp; <br />
			<i>29.05.2020 19:44:38, Сирануш.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message45769/topic5506/</link>
			<guid>http://forum.quik.ru/messages/forum10/message45769/topic5506/</guid>
			<pubDate>Fri, 29 May 2020 19:44:38 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
	</channel>
</rss>
