<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Команда "Format"]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13687&amp;type=atom" />
	<updated>2018-05-07T19:15:26Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13687</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Команда "Format"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125196#p125196" />
			<content type="html"><![CDATA[<p>Всё правильно:<br /></p><div class="quotebox"><blockquote><p>Use a single space to prefix the output value with a space if it is signed and positive.</p></blockquote></div><p>Чтобы сделать паддинг пробелами, сам пробел писать не нужно.<br /></p><div class="quotebox"><blockquote><p>Width: a decimal integer which controls the minimum width of the formatted value, in characters. <em>By default, values are right-aligned and spaces are used for padding</em>.</p></blockquote></div><p>&quot;i&quot; там тоже ни к чему.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-05-07T19:15:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125196#p125196</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Команда "Format"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125192#p125192" />
			<content type="html"><![CDATA[<p>Пытаюсь разобраться с командой <em>Format</em>, возник вопрос.</p><p>Вот например мне нужно чтоб число было 18-значным.<br /></p><div class="codebox"><pre><code>s444 .= Format(&quot;{1:018i}&quot;, 54321)
s666 .= Format(&quot;{1: 18i}&quot;, 54321)
ListVars</code></pre></div><p>Так работает. В первом случае недостающие знаки заполняются нолями. Во втором случае - пробелами. Вроде всё хорошо.</p><p>Дальше я пытаюсь дополнить число пробелами до 3 знаков. Но если число уже содержит 3 знака, добавляется лишний пробел, а он мне не нужен. Что я делаю не так?<br /></p><div class="codebox"><pre><code>s3 .= Format(&quot;{1: 3i}&quot;,555)
s4 .= &quot;&gt;&gt;&gt;&quot;
s4 .= s3
s4 .= &quot;&lt;&lt;&lt;&quot;
ListVars</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2018-05-07T18:24:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125192#p125192</id>
		</entry>
</feed>
