Difference between revisions of "Template:~targ"

From Maths
Jump to: navigation, search
(Created page with "{{#if:{{{1|}}}|{{{1|}}}|{{{2|}}}}}<noinclude> ==Purpose== If we write {{C|<nowiki>{{{1|{{{2|}}}}}}</nowiki>}} this becomes 2 only if 1 is completely absent, if we call this te...")
 
(No difference)

Latest revision as of 14:58, 3 February 2018

Purpose

If we write {{{1|{{{2|}}}}}} this becomes 2 only if 1 is completely absent, if we call this template as ...|1=|2=stuff}} then this will become "" (empty string) as 1 is set, it's just empty.

In this case you would use:

  • {{~targ|1={{{1|}}}|2={{{2|}}}}} which evaluates to its 2nd input if 1 is empty