Difference between revisions of "Let"
From Sega Retro
(Created page with "<includeonly>{{#forargs:|varname|varcontent|{{#vardefine:{{#var:varname}}|{{#var:varcontent}}}}}}</includeonly><noinclude> Shorthand for vardefine. ==Usage== * <tt><nowiki>{{...") |
|||
Line 4: | Line 4: | ||
==Usage== | ==Usage== | ||
* <tt><nowiki>{{let|xxx=yyy}}</nowiki></tt> = <tt><nowiki>{{#vardefine:xxx|yyy}}</nowiki></tt> | * <tt><nowiki>{{let|xxx=yyy}}</nowiki></tt> = <tt><nowiki>{{#vardefine:xxx|yyy}}</nowiki></tt> | ||
+ | |||
+ | * <tt><nowiki>{{let|xxx=yyy|zzz=aaa}}</nowiki></tt> = <tt><nowiki>{{#vardefine:xxx|yyy}}{{#vardefine:zzz|aaa}}</nowiki></tt> | ||
+ | |||
+ | ===Limitations=== | ||
+ | * <tt><nowiki>{{let|xxx=yyy|zzz={{#var:xxx}}}}</nowiki></tt> - This won't work. A single use of the template can't reference itself. Use <tt><nowiki>{{let|xxx=yyy}}{{let|zzz={{#var:xxx}}}}</nowiki></tt> instead. | ||
[[Category:Sega Retro templates]] | [[Category:Sega Retro templates]] | ||
</noinclude> | </noinclude> |
Revision as of 17:59, 1 June 2021
Shorthand for vardefine.
Usage
- {{let|xxx=yyy}} = {{#vardefine:xxx|yyy}}
- {{let|xxx=yyy|zzz=aaa}} = {{#vardefine:xxx|yyy}}{{#vardefine:zzz|aaa}}
Limitations
- {{let|xxx=yyy|zzz={{#var:xxx}}}} - This won't work. A single use of the template can't reference itself. Use {{let|xxx=yyy}}{{let|zzz={{#var:xxx}}}} instead.