Template:Loop1

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search

This template is used to produce a simple loop that can repeat up to 150 times. It is not a real loop, it works by conditionally repeating the string. It is a simple version of {{For}}. To use it, enter:
{{loop1|times to repeat|string}}
If string contains an equals sign, you must put "|2=string" instead of "|string". Examples:

  • {{loop1|4|n}} produces nnnn
  • {{loop1|25|test}} produces testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest
  • {{#expr:2{{loop1|50|*2}}}} produces 2.2517998136852E+15
  • {{loop1|9|2==}} produces ==== (the "2=" must be present)
  • {{loop1|3|{{CURRENTYEAR}}}} produces 201420142014
http://meta.wikimedia.org/wiki/Template:Loop1
meta.wikimedia.org
crawl=CC-MAIN-2014-10
21497
application/http; msgtype=response
sha1:GEUCXJTXUDVA7DDVXNVVOSEG24CDMYPQ
<urn:uuid:bc4f6261-4059-4c4d-8515-a3ded2841b3a>
2014-03-07T12:26:00Z
208.80.154.224
sha1:QXZQNWDOAXVUODFFS7G4QWVJLSNHDRTO
<urn:uuid:f3ffe09b-3624-473f-b42c-2f650f71c4d0>
http://meta.wikimedia.org/wiki/Template:Loop1
response
<urn:uuid:2c57438a-ae59-423e-b041-42fa002fdb2e>
robots: classic
hostname: ip-10-183-142-35.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2014-10
operator: CommonCrawl Admin
description: Wide crawl of the web with URLs provided by Blekko for March 2014
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf