Template:Loop!

From Wikisource
Jump to: navigation, search
Documentation icon Template documentation[view] [edit] [history] [purge]


Usage[edit]

The template repeats n times (parameter 1) the object passed as parameter 2. It is strongly recommended to use only numbers into the span 1...10 as n, to use the internal algorithm only; other values can be used, in this case the template calls the alternative {{Loop}} for back-compatibility too. This use is deprecated (use {{Loop}} instead).

To obtain different numbers of repetitions, simply use nesting or appending: t.i. to obtain 15 repetitions, nest a loop!|5 into a a loop!|3, or append a loop!|5 to a loop!|10.

Code Result
{{loop!|3| *}}
 * * *
nesting: {{loop!|5|{{loop!|3| *}}}}
 * * * * * * * * * * * * * * *
appending: {{loop!|10| *}}{{loop!|5| *}}
 * * * * * * * * * * * * * * *
{{loop!|12| *}} (deprecated) 
 * * * * * * * * * * * * (deprecated)