Difference between revisions of "Incvar"

From Sega Retro

m (Protected "Template:Incvar": High-traffic template ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
Line 13: Line 13:
 
{{#vardefine:testvalue|5}}{{incvar|testvalue}}
 
{{#vardefine:testvalue|5}}{{incvar|testvalue}}
 
testvalue = {{#var:testvalue}}
 
testvalue = {{#var:testvalue}}
[[Category:Sega Retro templates]]
+
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 13:25, 1 January 2022

Increment a variable by 1.

Usage

{{#vardefine:testvalue|5}}
{{incvar|testvalue}}
testvalue = {{#var:testvalue}}

Returns:


testvalue = 6