Template:+=: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(Created page with "<includeonly>{{#vardefine:{{{1}}}|{{#expr:{{#var:{{{1}}}}}+{{#iferror:{{#expr:{{formatnum:{{{2|1}}}|R}}}}|{{#var:{{{2}}}}}|{{formatnum:{{{2|1}}}|R}}}}}}}}{{#switch:{{{echo}}}|1={{#var:{{{1}}}}}|2={{{2}}}}}</includeonly><noinclude>{{/doc}}</noinclude>") |
(No difference)
|
Latest revision as of 02:39, 12 October 2024
Template documentation
This documentation is transcluded from Template:+=/doc. [edit] [history] [purge]
The += template is used to calculate running totals.
Usage
{{+= |1 = The variable to add to |2 = A variable name or number |echo = Echo the 1 or 2 param }}
1
(Required) The name of the variable you wish to add something to.
2
(Optional) The name of a variable to add to the first, or a number. Defaults to 1.
echo
(Optional) Echoes the {{{1}}} (echo=1
) or {{{2}}} (echo=2
) params.
Template data
Show/hide template's data |
---|