« Loops - loop » : différence entre les versions
De Semantic MediaWiki - Sandbox
(new) |
(add) |
||
Ligne 15 : | Ligne 15 : | ||
* This is round {{#var: varname }} and we have {{#expr: 7 - {{#var: varname }} }} more to go | * This is round {{#var: varname }} and we have {{#expr: 7 - {{#var: varname }} }} more to go | ||
}} | }} | ||
{{Callout | {{Callout | ||
Ligne 20 : | Ligne 21 : | ||
|info | |info | ||
}} | }} | ||
{{Keywords|Keywords=loops;variables;parserfunctions;loop}} | |||
[[Category:Loops examples]] | [[Category:Loops examples]] |
Dernière version du 4 septembre 2018 à 10:00
- Syntax
{{#loop: varname | 4 | 4 | <nowiki /> * This is round {{#var: varname }} and we have {{#expr: 7 - {{#var: varname }} }} more to go }}
- Result
- This is round 4 and we have 3 more to go
- This is round 5 and we have 2 more to go
- This is round 6 and we have 1 more to go
- This is round 7 and we have 0 more to go
This example makes use of the "ParserFunctions" extension and the "Variables" extension.