Template:X/doc
![]() | This is a documentation subpage for Template:X. It contains usage information, categories, and other content that is not part of the original template page. |
Purpose[edit]
This template gives repetition of a specified wikitext for a number of times.
Examples[edit]
- {{
x|24|pq
}} gives pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq (24 times "pq ").
Compare Template:Xxx:
"{{xxx|pq |4|6}}"
gives "pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq " [1]
and the older Template:Xx:
- {{
xx|2|4|pq
}} gives pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq pq
Limitation[edit]
The allowed number of repetitions is any number which after division by 10 and rounding down has a corresponding template:
0x 1x 2x 3x 4x 5x 6x 7x 8x 9x 10x 11x 12x 13x 14x 15x 16x 17x 18x 19x 20x 21x 22x 23x 24x 25x 26x 27x 28x 29x 30x 31x 32x 33x 34x 35x 36x 37x 38x 39x 40x 41x 42x 43x 44x 45x 46x 47x 48x 49x 50x 51x 52x 53x 54x 55x 56x 57x 58x 59x 60x 61x 62x 63x 64x 65x 66x 67x 68x 69x 70x 71x 72x 73x 74x 75x 76x 77x 78x 79x 80x 81x 82x 83x 84x 85x 86x 87x 88x 89x 90x 91x 92x 93x 94x 95x 96x 97x 98x 99x 100x
n too large:
"{{x|120|abc}}"
gives "Template:12x" [2]
n non-integer:
"{{x|1.5|abc}}"
gives "Template:0.05xabc" [3]
n negative:
"{{x|-1|abc}}"
gives "Template:-1x" [4]
See also[edit]