Template:Ifnumber: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<includeonly>{{#iferror:{{#expr:{{{1|}}}}}||y}}</includeonly><noinclude> ==Info== Returns "y" if the parameter given is a number, returns nothing otherwise. Inspired by the [...") |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{{#iferror:{{#expr:{{{1|}}}}}||y}}</includeonly><noinclude> | <includeonly>{{#iferror:{{#expr:{{{1|}}}}}|{{{3|}}}|{{{2|y}}}}}</includeonly><noinclude> | ||
==Info== | ==Info== | ||
Checks if the first parameter is a number. Returns the second parameter if so, and the third if not. The second and third parameters are optional, and the template will return "y" or nothing in that case. Inspired by the [[wikipedia:Template:Ifnumber|Wikipedia template]]. | |||
[[Category:Utility templates]]</noinclude> | [[Category:Utility templates]]</noinclude> |
Latest revision as of 06:00, September 8, 2015
Info
Checks if the first parameter is a number. Returns the second parameter if so, and the third if not. The second and third parameters are optional, and the template will return "y" or nothing in that case. Inspired by the Wikipedia template.