<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="nl">
	<id>https://informatiestandaarden.test-nictiz.nl/index.php?action=history&amp;feed=atom&amp;title=Sjabloon%3AFor_loop%2Fdoc</id>
	<title>Sjabloon:For loop/doc - Bewerkingsoverzicht</title>
	<link rel="self" type="application/atom+xml" href="https://informatiestandaarden.test-nictiz.nl/index.php?action=history&amp;feed=atom&amp;title=Sjabloon%3AFor_loop%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://informatiestandaarden.test-nictiz.nl/index.php?title=Sjabloon:For_loop/doc&amp;action=history"/>
	<updated>2026-05-17T13:51:43Z</updated>
	<subtitle>Bewerkingsoverzicht voor deze pagina op de wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://informatiestandaarden.test-nictiz.nl/index.php?title=Sjabloon:For_loop/doc&amp;diff=674&amp;oldid=prev</id>
		<title>Ahenket op 17 jul 2013 om 10:50</title>
		<link rel="alternate" type="text/html" href="https://informatiestandaarden.test-nictiz.nl/index.php?title=Sjabloon:For_loop/doc&amp;diff=674&amp;oldid=prev"/>
		<updated>2013-07-17T10:50:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;nl&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Oudere versie&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versie van 17 jul 2013 10:50&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Regel 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Regel 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This template produces a [[for loop]]. Or more accurately, it is a quasi-for-loop, as the value for each iteration must be explicitly specified. This is a legacy template, and exists for reasons of backwards compatibility. If you need to use a for loop, it is almost always better to implement it as a [[WP:Lua|Lua module]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This template produces a [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Wikipedia:for loop|&lt;/ins&gt;for loop]]. Or more accurately, it is a quasi-for-loop, as the value for each iteration must be explicitly specified. This is a legacy template, and exists for reasons of backwards compatibility. If you need to use a for loop, it is almost always better to implement it as a [[WP:Lua|Lua module]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The template calls a specified template a set number of times, where one parameter takes each of a list of values; in addition to the variable parameter, fixed parameters can be specified for each iteration.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The template calls a specified template a set number of times, where one parameter takes each of a list of values; in addition to the variable parameter, fixed parameters can be specified for each iteration.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ahenket</name></author>
	</entry>
	<entry>
		<id>https://informatiestandaarden.test-nictiz.nl/index.php?title=Sjabloon:For_loop/doc&amp;diff=672&amp;oldid=prev</id>
		<title>Ahenket: Nieuwe pagina aangemaakt met &#039;{{Documentation subpage}} &lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. --&gt;  This template produces a for loop. Or more accurately, it i...&#039;</title>
		<link rel="alternate" type="text/html" href="https://informatiestandaarden.test-nictiz.nl/index.php?title=Sjabloon:For_loop/doc&amp;diff=672&amp;oldid=prev"/>
		<updated>2013-07-17T10:48:54Z</updated>

		<summary type="html">&lt;p&gt;Nieuwe pagina aangemaakt met &amp;#039;{{Documentation subpage}} &amp;lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. --&amp;gt;  This template produces a &lt;a href=&quot;/index.php?title=For_loop&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;For loop (de pagina bestaat niet)&quot;&gt;for loop&lt;/a&gt;. Or more accurately, it i...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nieuwe pagina&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
&amp;lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template produces a [[for loop]]. Or more accurately, it is a quasi-for-loop, as the value for each iteration must be explicitly specified. This is a legacy template, and exists for reasons of backwards compatibility. If you need to use a for loop, it is almost always better to implement it as a [[WP:Lua|Lua module]].&lt;br /&gt;
&lt;br /&gt;
The template calls a specified template a set number of times, where one parameter takes each of a list of values; in addition to the variable parameter, fixed parameters can be specified for each iteration.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{for loop|&amp;lt;!-- separator, whitespace is preserved --&amp;gt;|call = template to call&lt;br /&gt;
  | pc1n = name of the first fixed parameter &lt;br /&gt;
  | pc1v = value of the first fixed parameter&lt;br /&gt;
  | pc2n = name of the second fixed parameter &lt;br /&gt;
  | pc2v = value of the second fixed parameter&lt;br /&gt;
  | pc3n = name of the third fixed parameter &lt;br /&gt;
  | pc3v = value of the third fixed parameter&lt;br /&gt;
&amp;lt;!-- More fixed parameters can be inserted as needed --&amp;gt;&lt;br /&gt;
  | pv = name of the parameter that the variable values will be passed to&lt;br /&gt;
  | prefix = fixed prefix for each of the variable values&lt;br /&gt;
  | postfix= fixed postfix for each of the variable values&lt;br /&gt;
  | list of variable values with separator &amp;quot;|&amp;quot;, whitespace is stripped&lt;br /&gt;
     (empty parameter values work in the regular way, they are &amp;#039;&amp;#039;not&amp;#039;&amp;#039; ignored like undefined ones)&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The separator is unnamed, allowing it to start and/or end with [[Help:newlines and spaces|newlines and spaces]]. The separator should be put before the variable list. If a variable in the list contains an equals sign, the list should use named parameters, at least from that point. If you use named parameters, note that e.g. the third item in the list is parameter 4, because parameter 1 is the separator. If the separator contains an equals sign it is  similarly prefixed with &amp;quot;1=&amp;quot;, but in that case it cannot contain newlines and spaces at the start and end. Also, if you use named parameters, you must not skip any numbers. The loop will terminate after the first absent numbered parameter. (Note that parameters can be blank but not absent; blank parameters are read as normal.)&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;, border=1&lt;br /&gt;
!Code&lt;br /&gt;
!Result&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre&amp;gt;1{{for loop|, 1|00|01|02|03|04|05|06|07|08|09&lt;br /&gt;
|10|11|12|13|14|15|16|17|18|19&lt;br /&gt;
|20|21|22|23|24|25|26|27|28|29&lt;br /&gt;
|30|31|32|33|34|35|36|37|38|39&lt;br /&gt;
|40|41|42|43|44|45|46|47|48|49&lt;br /&gt;
|50|51|52|53|54|55|56|57|58|59&lt;br /&gt;
|60|61|62|63|64|65|66|67|68|69&lt;br /&gt;
|70|71|72|73|74|75|76|77|78|79&lt;br /&gt;
|80|81|82|83|84|85|86|87|88|89&lt;br /&gt;
|90|91|92|93|94|95|96|97|98|99&lt;br /&gt;
  |call=1x&lt;br /&gt;
}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
|1{{for loop|, 1|00|01|02|03|04|05|06|07|08|09&lt;br /&gt;
|10|11|12|13|14|15|16|17|18|19&lt;br /&gt;
|20|21|22|23|24|25|26|27|28|29&lt;br /&gt;
|30|31|32|33|34|35|36|37|38|39&lt;br /&gt;
|40|41|42|43|44|45|46|47|48|49&lt;br /&gt;
|50|51|52|53|54|55|56|57|58|59&lt;br /&gt;
|60|61|62|63|64|65|66|67|68|69&lt;br /&gt;
|70|71|72|73|74|75|76|77|78|79&lt;br /&gt;
|80|81|82|83|84|85|86|87|88|89&lt;br /&gt;
|90|91|92|93|94|95|96|97|98|99&lt;br /&gt;
  |call=1x&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that the last part of the separator is used as a prefix; the first prefix needs to be put separately.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{for loop|-|a|3||c|g|call=3x}}&amp;lt;/nowiki&amp;gt; using {{tiw|3x}} gives&lt;br /&gt;
&lt;br /&gt;
{{for loop|-|a|3||c|g|call=3x}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{for loop|&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;|a|3||c|g|call=3x}}&amp;lt;/nowiki&amp;gt; gives&lt;br /&gt;
&lt;br /&gt;
{{for loop|&lt;br /&gt;
&lt;br /&gt;
|a|3||c|g|call=3x}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Test&lt;br /&gt;
|-&lt;br /&gt;
| {{for loop|&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} |a|b|c|d|e|call=3x}}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gives:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Test&lt;br /&gt;
|-&lt;br /&gt;
| {{for loop|&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} |a|b|c|d|e|call=3x}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{for loop| |01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19&lt;br /&gt;
|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39&lt;br /&gt;
|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59&lt;br /&gt;
|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79&lt;br /&gt;
|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99&lt;br /&gt;
|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119&lt;br /&gt;
|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139&lt;br /&gt;
|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|call=1x}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
gives:&lt;br /&gt;
&lt;br /&gt;
{{for loop| |01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19&lt;br /&gt;
|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39&lt;br /&gt;
|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59&lt;br /&gt;
|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79&lt;br /&gt;
|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99&lt;br /&gt;
|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119&lt;br /&gt;
|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139&lt;br /&gt;
|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|call=1x}}&lt;br /&gt;
&lt;br /&gt;
== Legacy code ==&lt;br /&gt;
&lt;br /&gt;
This template is currently in its third incarnation. It is now based on the [[WP:Lua|Lua]] code at [[Module:ForLoop]]. It was ported to Lua from [[mw:Help:Extension:ParserFunctions|ParserFunctions]], and the old code is available for use at {{tl|for loop/old}}. There was also a previous version with a named &amp;quot;sep&amp;quot; parameter to specify the separator value. The template was originally based on [[:m:Template:For]].  The template name was changed because there was already a [[Template:For]] on Wikipedia.&lt;br /&gt;
&lt;br /&gt;
The old versions were limited to 150 variable values and four fixed parameters. There are no such limits in the current version. Also, in the first version the &amp;quot;sep&amp;quot; parameter didn&amp;#039;t allow whitespace in the separator value. This was fixed with the second version, and this behaviour was retained in the current version.&lt;br /&gt;
&lt;br /&gt;
=== Substitution ===&lt;br /&gt;
&lt;br /&gt;
The current Lua-based template supports [[WP:SUBST|substitution]] of the whole template call. To substitute everything, use {{tls|for loop}}.&lt;br /&gt;
&lt;br /&gt;
The previous ParserFunctions-based template supported varying levels of substitution. If you wish to have fine-grained control over substitution, you need to use {{tl|for loop/old}}. For successive levels of substitution use one or more or the following (the first, the first two, the first three, the first four, or all five).&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;subst:&amp;quot; in front of &amp;quot;for loop/old&amp;quot; -  substitute the call of {{tl|for loop/old}}&lt;br /&gt;
*substf=subst: - substitute the parser functions in {{tl|for loop/old}}&lt;br /&gt;
*substfa=subst: - substitute the call of {{tl|ForLoop/aux}}, a helper subtemplate&lt;br /&gt;
*substa=subst: - substitute the parser functions in {{tl|ForLoop/aux}} (reduces the number of items from 150 to the actual number)&lt;br /&gt;
*substc=subst: - substitute the calls of the user template&lt;br /&gt;
&lt;br /&gt;
If at least the first four are applied, and the separator contains &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, one can replace it with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{subst:!}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to substitute that too.&lt;br /&gt;
&lt;br /&gt;
For full substitution [[Special:ExpandTemplates]] can also be used.&lt;br /&gt;
&lt;br /&gt;
=== Converting legacy template invocations ===&lt;br /&gt;
&lt;br /&gt;
If you need to convert a template invocation that was written for the original version of {{tl|for loop}}, do the following:&lt;br /&gt;
*replace &amp;lt;code&amp;gt;pc1=X=Y&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;pc1n=X | pc1v=Y&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
*use an unnamed parameter for the separator; if empty, just enter an extra &amp;quot;|&amp;quot;&lt;br /&gt;
No conversion is necessary for invocations written for the second version of the template. The Lua-based template is fully backwards-compatible with the second ParserFunctions-based template.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*{{tim|foreach}}&lt;br /&gt;
*{{tim|tblb}}&lt;br /&gt;
*{{tiw|loop}}&lt;br /&gt;
*{{tiw|repeat}}&lt;br /&gt;
*{{tiw|simple recursion}}&lt;br /&gt;
*[[Help:Parameter default]]&lt;br /&gt;
*[[Help:Array]]&lt;br /&gt;
*[[mw:Extension:LoopFunctions]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&amp;lt;!-- CATEGORIES AND INTERWIKIS HERE, THANKS --&amp;gt;&lt;br /&gt;
[[Category:Wikipedia formatting and function templates|{{PAGENAME}}]]&lt;br /&gt;
&lt;br /&gt;
[[ca:Plantilla:For loop]]&lt;br /&gt;
[[dsb:Pśedłoga:For]]&lt;br /&gt;
[[eo:Ŝablono:For]]&lt;br /&gt;
[[hsb:Předłoha:For]]&lt;br /&gt;
[[pl:Szablon:For2]]&lt;br /&gt;
[[ru:Шаблон:For]]&lt;br /&gt;
[[sk:Šablóna:For]]&lt;br /&gt;
[[sl:Predloga:For3]]&lt;br /&gt;
[[uk:Шаблон:For loop]]&lt;br /&gt;
[[ur:Template:For loop]]&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ahenket</name></author>
	</entry>
</feed>