<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="vi">
	<id>https://bktt.vn/index.php?action=history&amp;feed=atom&amp;title=B%E1%BA%A3n_m%E1%BA%ABu%3AVal%2Fdelimitnum</id>
	<title>Bản mẫu:Val/delimitnum - Lịch sử thay đổi</title>
	<link rel="self" type="application/atom+xml" href="https://bktt.vn/index.php?action=history&amp;feed=atom&amp;title=B%E1%BA%A3n_m%E1%BA%ABu%3AVal%2Fdelimitnum"/>
	<link rel="alternate" type="text/html" href="https://bktt.vn/index.php?title=B%E1%BA%A3n_m%E1%BA%ABu:Val/delimitnum&amp;action=history"/>
	<updated>2026-05-13T23:24:59Z</updated>
	<subtitle>Lịch sử thay đổi của trang này ở wiki</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://bktt.vn/index.php?title=B%E1%BA%A3n_m%E1%BA%ABu:Val/delimitnum&amp;diff=11348&amp;oldid=prev</id>
		<title>Marrella: Tạo trang mới với nội dung “&lt;includeonly&gt;&lt;!-- --&gt;{{#ifeq: &lt;!-- compare &quot;04&quot; to 4, and if so, output 4-digits pure   What might be &quot;04&quot; is composed of three outputs: dot, len, and fmt…”</title>
		<link rel="alternate" type="text/html" href="https://bktt.vn/index.php?title=B%E1%BA%A3n_m%E1%BA%ABu:Val/delimitnum&amp;diff=11348&amp;oldid=prev"/>
		<updated>2021-01-06T08:18:15Z</updated>

		<summary type="html">&lt;p&gt;Tạo trang mới với nội dung “&amp;lt;includeonly&amp;gt;&amp;lt;!-- --&amp;gt;{{#ifeq: &amp;lt;!-- compare &amp;quot;04&amp;quot; to 4, and if so, output 4-digits pure   What might be &amp;quot;04&amp;quot; is composed of three outputs: dot, len, and fmt…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Trang mới&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;includeonly&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#ifeq: &amp;lt;!-- compare &amp;quot;04&amp;quot; to 4, and if so, output 4-digits pure&lt;br /&gt;
  What might be &amp;quot;04&amp;quot; is composed of three outputs: dot, len, and fmt --&amp;gt;&lt;br /&gt;
  {{#invoke:String|find|{{{1}}}|.}}&amp;lt;!-- Output the zero if no dot.&lt;br /&gt;
  --&amp;gt;{{#invoke:String|len &amp;lt;!-- Length of 4 with sign and spaces filtered? --&amp;gt;&lt;br /&gt;
    |{{#invoke:String|replace|{{{1}}}|[-+ ]|plain=false}}}}&amp;lt;!-- &lt;br /&gt;
    That replace just filtered out any and all spaces, + or - characters.&lt;br /&gt;
    But it's gotta have the minus sign first in the [-charclass].&lt;br /&gt;
    Any fmt given?  If so comparison to &amp;quot;4&amp;quot; will fail --&amp;gt;{{{fmt|}}}&lt;br /&gt;
| 4 |{{#invoke:String|replace|{{{1}}}|-|&amp;amp;minus;}}&amp;lt;!-- &lt;br /&gt;
If fmt is nil, found . is 0, and filtered len is 4, then 04=4, &lt;br /&gt;
and we have just output the number, replacing any - with a minus sign&lt;br /&gt;
&lt;br /&gt;
Else: &lt;br /&gt;
--&amp;gt;|{{#switch: &amp;lt;!-- its not a pure 4-digit number with no fmt options given--&amp;gt;&lt;br /&gt;
{{#invoke:String|sub|{{{1|0}}}|1|1}}&lt;br /&gt;
  &amp;lt;!-- If the first char is ... --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  |- &amp;lt;!-- ... one kind of dash, or another --&amp;gt;&lt;br /&gt;
  |− = {{#ifeq:{{{nosign|off}}}|off|−}}&amp;lt;!-- output a &amp;amp;minus; sign unless nosign&lt;br /&gt;
     --&amp;gt;{{#ifeq:&lt;br /&gt;
          {{#invoke:String|sub|{{{1|0}}}|2|2}}|.|0}}&amp;lt;!--And then &lt;br /&gt;
          then if next char is . then output a zero, else do || nothing.&lt;br /&gt;
     --&amp;gt;{{#switch: {{{fmt}}} &amp;lt;!-- Format the rest of the number. --&amp;gt;&lt;br /&gt;
       |commas={{formatnum:{{#invoke:String|sub|{{{1|0}}}|2}}}}&lt;br /&gt;
       |#default = {{#invoke:Gapnum|main|{{#invoke:String|sub|{{{1|0}}}|2}}}}&lt;br /&gt;
   }} &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- follow same logic for leading + char --&amp;gt;&lt;br /&gt;
  |+={{#ifeq:{{{nosign|off}}}|off|+}}&amp;lt;!--&lt;br /&gt;
    --&amp;gt;{{#ifeq:{{#invoke:String|sub|{{{1|0}}}|2|2}}|.|0}}&amp;lt;!--&lt;br /&gt;
      --&amp;gt;{{#switch:{{{fmt}}}&lt;br /&gt;
        |commas = {{formatnum:{{#invoke:String|sub|{{{1|0}}}|2}}}}&lt;br /&gt;
        |#default = {{#invoke:Gapnum|main|{{#invoke:String|sub|{{{1|0}}}|2}}}}&lt;br /&gt;
     }} &amp;lt;!-- follow similar logic for leading . char --&amp;gt;&lt;br /&gt;
  |.=0&amp;lt;!--&lt;br /&gt;
    --&amp;gt;{{#switch:{{{fmt}}}&lt;br /&gt;
      |commas={{{1|0}}}&lt;br /&gt;
      |#default = {{#invoke:Gapnum|main|{{{1|0}}}}}&lt;br /&gt;
    }}&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- Else if first char is not . or - or + --&amp;gt;&lt;br /&gt;
  |#default = {{#switch:{{{fmt}}} &lt;br /&gt;
     |commas={{formatnum:{{{1|0}}}}}&lt;br /&gt;
     |#default = {{#invoke:Gapnum|main|{{{1|0}}}}}&lt;br /&gt;
      }}&lt;br /&gt;
   }}&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;{{documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marrella</name></author>
	</entry>
</feed>