Template:For/doc: Difference between revisions
Template page
More actions
m grammar |
Fix language-code links to use Wikipedia interwiki prefixes |
||
| (8 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{for2|the template equivalent to <nowiki>{{</nowiki>[[ | {{for2|the template equivalent to <nowiki>{{</nowiki>[[w:template:for|for]]<nowiki>}}</nowiki> on the English Wikipedia|[[template:for2]]}} | ||
{{Lua|Module:ForLoop}} | {{Lua|Module:ForLoop}} | ||
{{TemplateBox | {{TemplateBox | ||
| Line 141: | Line 141: | ||
!Result | !Result | ||
|- | |- | ||
| | |List of all numbers from 100 to 199, separated by commas:<br> | ||
<pre>1{{for|, 1|call=x1 | <pre>1{{for|, 1|call=x1 | ||
|00|01|02|03|04|05|06|07|08|09 | |00|01|02|03|04|05|06|07|08|09 | ||
| Line 154: | Line 154: | ||
|90|91|92|93|94|95|96|97|98|99 | |90|91|92|93|94|95|96|97|98|99 | ||
}}</pre> | }}</pre> | ||
<nowiki> | |||
|1{{for|, 1|call=x1 | |1{{for|, 1|call=x1 | ||
|00|01|02|03|04|05|06|07|08|09 | |00|01|02|03|04|05|06|07|08|09 | ||
| Line 166: | Line 167: | ||
|90|91|92|93|94|95|96|97|98|99 | |90|91|92|93|94|95|96|97|98|99 | ||
}} | }} | ||
</nowiki> | |||
|- | |||
|An example used in {{tl|Facts/Major cities}}:<br> | |||
<pre>{{for||pc1n=decade|pc1v={{{2|{{{decade|}}}}}}|call=Facts/placeParts | |||
|Amsterdam|Bangkok|Barcelona|Beijing|Berlin|Brussels|Buenos Aires|Cairo|Canton|Cape Town|Chicago|Delhi|Dubai|Frankfurt am Main|Geneva|Hong Kong|Istanbul|Jerusalem|Kolkata|Lagos, Nigeria|London|Los Angeles|Madrid|Mexico City|Moscow|Mumbai|Nairobi|New York City|Osaka|Paris|Rio de Janeiro (city)|Rome|São Paulo (city)|San Francisco|Seoul|Shanghai|Singapore|Stockholm|Sydney|Tokyo|Toronto|Washington, D.C.|Wuhan}}</pre> | |||
<nowiki> | |||
|{{for||pc1n=decade|pc1v={{{2|{{{decade|}}}}}}|call=Facts/placeParts | |||
|Amsterdam|Bangkok|Barcelona|Beijing|Berlin|Brussels|Buenos Aires|Cairo|Canton|Cape Town|Chicago|Delhi|Dubai|Frankfurt am Main|Geneva|Hong Kong|Istanbul|Jerusalem|Kolkata|Lagos, Nigeria|London|Los Angeles|Madrid|Mexico City|Moscow|Mumbai|Nairobi|New York City|Osaka|Paris|Rio de Janeiro (city)|Rome|São Paulo (city)|San Francisco|Seoul|Shanghai|Singapore|Stockholm|Sydney|Tokyo|Toronto|Washington, D.C.|Wuhan}} | |||
</nowiki> | |||
|} | |} | ||
Note that the last part of the separator is used as a prefix; the first prefix needs to be put separately.<includeonly> | Note that the last part of the separator is used as a prefix; the first prefix needs to be put separately.<includeonly> | ||
[[Category:Function templates]]</includeonly> | [[Category:Function templates]]</includeonly> | ||