<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Математика]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=15244&amp;type=atom" />
	<updated>2020-03-19T09:50:24Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=15244</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=138525#p138525" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong> спасибо большое. Разобрался.</p>]]></content>
			<author>
				<name><![CDATA[Leone_Galante]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39097</uri>
			</author>
			<updated>2020-03-19T09:50:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=138525#p138525</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=138522#p138522" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>b := &quot;43,306&quot; ; строка должна быть в кавычках, это не число, так как используется запятая
StringReplace, b1, b, `,, . ; эта команда устаревшая, запятая экранируется знаком `
MsgBox, % b1
; лучше так
MsgBox, % b1 := StrReplace(b, &quot;,&quot;, &quot;.&quot;)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-03-19T01:20:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=138522#p138522</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=138521#p138521" />
			<content type="html"><![CDATA[<p>что я делаю не так?<br /></p><div class="codebox"><pre><code>f6::
a := 12311111
b := 43,306
c := 500
StringReplace, b1, b, &quot;,&quot;,.,1
MsgBox, % b1      
Return</code></pre></div><p>и так пробовал</p><div class="codebox"><pre><code>f6::
a := 12311111
b := 43,306
c := 500
StringReplace, b1, b, &quot;,&quot;,&quot;.&quot;,1
MsgBox, % b1      
Return</code></pre></div><p>выдает только целое число 43</p>]]></content>
			<author>
				<name><![CDATA[Leone_Galante]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39097</uri>
			</author>
			<updated>2020-03-18T23:22:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=138521#p138521</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=138520#p138520" />
			<content type="html"><![CDATA[<p>Если исходные данные с запятой, и на выходе нужно тоже с запятой, тогда проще заменять с помощью StrReplace().</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-03-18T19:31:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=138520#p138520</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=138519#p138519" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>не запятая, а точка</p></blockquote></div><p>теперь все стало на свои места <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /> спасибо.</p><p>А если в переменных находятся числа с плавающей запятой, то мне лучше использовать&nbsp; RegExReplace для замены запятой на точку, произвести необходимые расчеты а потом на выводе конечного результата заменить опять точку на запятую? Или как будет правильней?</p>]]></content>
			<author>
				<name><![CDATA[Leone_Galante]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39097</uri>
			</author>
			<updated>2020-03-18T18:15:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=138519#p138519</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=138518#p138518" />
			<content type="html"><![CDATA[<p>В программировании для отделения дробной части используется не запятая, а точка.<br /></p><div class="codebox"><pre><code>x1 := 5.55
x2 := 7.77
x3 := x1 + x2
MsgBox, % x3
MsgBox, % Round(x3, 2)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-03-18T14:35:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=138518#p138518</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Математика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=138517#p138517" />
			<content type="html"><![CDATA[<p>Всем привет. Хочу научиться считать в ахк. К примеру есть переменные:<br />х1:=5,55<br />х2:=7,77<br />Мне нужно умножить, сложить, отнять числа с плавающей точкой: 5,55*7,77=<br />Пусть будет получена третья переменная с результатом, который необходимо округлить до сотых.<br />Типа что то такого:<br /></p><div class="codebox"><pre><code>х3:=(%х1%+%х2%)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Leone_Galante]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39097</uri>
			</author>
			<updated>2020-03-18T14:21:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=138517#p138517</id>
		</entry>
</feed>
