आकृति:Ifnumber/doc
This is a documentation subpage for आकृति:Ifnumber. It contains usage information, categories and other content that is not part of the original आकृति page. |
This template is used on many pages, so changes to it will be widely noticed. Please test any changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Please consider discussing changes on the talk page before implementing them. |
Usage
सम्पादन करीReturns 1 if the value is numeric and 0 otherwise.
Examples
सम्पादन करीआकृति:Template example row आकृति:Template example row आकृति:Template example row आकृति:Template example row आकृति:Template example row आकृति:Template example row आकृति:Template example row आकृति:Template example row आकृति:Template example row आकृति:Template example row आकृति:Template example row आकृति:Template example row आकृति:Template example row आकृति:Template example row आकृति:Template example row
code | result |
---|---|
{{Ifnumber|{{val|123|5}}|number|value "{{val|123|5}}" not numeric}} | value "123±5" not numeric |
Notes
सम्पादन करीThis template will not recognize formatted numbers, which is by design since formatted numbers will break expression parsers. To remove the formatting from a number, you can wrap the number first in {{formatnum: number |R}}.
code | result |
---|---|
{{Ifnumber|1,000.50|a number|not a number}} | not a number |
{{Ifnumber|{{formatnum:1,000.50|R}}|a number|not a number}} | a number |
See also
सम्पादन करी- {{isnumeric}}