Difference between revisions of "Sequence"

From Sega Retro

(bish bash bosh)
Line 1: Line 1:
<includeonly>{{#vardefine:i|0}}{{#vardefine:{{{1|}}}|test}}{{#vardefine:blockstatement|{{{4|}}}}}{{#while:
+
<includeonly>{{#vardefine:i|0}}{{#vardefine:{{{1|}}}|$1337}}{{#vardefine:seqout|}}{{#while:
 
| {{#ifexpr: {{#len:{{#explode:{{{3}}}|{{{2}}}|{{#var:i}}}}}} > 0 | true }}
 
| {{#ifexpr: {{#len:{{#explode:{{{3}}}|{{{2}}}|{{#var:i}}}}}} > 0 | true }}
| {{#vardefine:{{{1|}}}|{{#explode:{{{3}}}|{{{2}}}|{{#var:i}}}}}}{{#var:blockstatement}}{{incvar|i}}
+
| {{#vardefine:r|{{#explode:{{{3}}}|{{{2}}}|{{#var:i}}}}}}{{#vardefine:seqout|{{#var:seqout}}{{#replace:{{{4|}}}|$1337|{{#var:r}}}}}}{{incvar|i}}
}}</includeonly><noinclude>
+
}}{{#var:seqout}}</includeonly><noinclude>
 
==Usage==
 
==Usage==
 
<pre>{{sequence|variablename|delimiter|array|
 
<pre>{{sequence|variablename|delimiter|array|
Line 18: Line 18:
 
* md_date_{{#var:region}}
 
* md_date_{{#var:region}}
 
}}
 
}}
 +
 +
[[Category:Sega Retro templates]]
 
</noinclude>
 
</noinclude>

Revision as of 01:32, 8 February 2018

Usage

{{sequence|variablename|delimiter|array|
block statement
}}

Example

{{sequence|region|,|jp,us,eu| 
* md_date_{{#var:region}}
}}

returns

  • md_date_jp
  • md_date_us
  • md_date_eu