Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:IfNum: Difference between revisions

Template page
m Changed protection level for "Template:IfNum": downgraded protection level per consensus ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite))
m 12 revisions imported
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{#ifeq:{{#invoke:String|isNumber|{{{1|1}}}}}|1|{{{2|}}}|{{{3|}}}}}<noinclude>
{{#ifeq:{{#invoke:IsNum|isNumber|{{{1|1}}}}}|1|{{{2|}}}|{{{3|}}}}}<noinclude>


{{heavily used template}}
{{heavily used template}}

Latest revision as of 17:04, 12 August 2026


Template documentation[ view · edit · history · purge ]
This documentation is transcluded from Template:IfNum/doc.

Checks if the parameter has a numeric value.

Usage

{{IfNum |1= |2= |3= }}

Template parameters

ParameterDescriptionDefaultStatus
1expression to testemptyrequired
2statement to show is true (parameter has a numeric value)emptyoptional
3statement to show is false (parameter is text or empty).emptyoptional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

Relies on:
Module:String

Localization

This template is not intended to be localized.

Examples

{{IfNum | 1234| number| not a number}} = number
{{IfNum | 1.34| number| not a number}} = number
{{IfNum | 0123| number| not a number}} = number
{{IfNum | -1| number| not a number}} = number
{{IfNum | +010| number| not a number}} = number
{{IfNum | 0| number| not a number}} = number
{{IfNum | -0| number| not a number}} = number
{{IfNum | 0.00| number| not a number}} = number
{{IfNum | 2010-01-01| number| not a number}} = not a number
{{IfNum | 2010-01| number| not a number}} = not a number
{{IfNum | abcde| number| not a number}} = not a number
{{IfNum | | number| not a number}} = not a number



Cookies help us deliver our services. By using our services, you agree to our use of cookies.