سانچہ:Ifnumber
ظاہری ہیئت
Usage
[ترمیم]Returns 1 if the value is numeric and 0 otherwise.
Examples
[ترمیم]| 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 |
| اوپر دی گئی دستاویز صفحہ سانچہ:Ifnumber/دستاویز سے شامل کی گئی ہے۔ (ترمیم | تاریخچہ) صارفین سانچہ کے تختہ مشق (تخلیق | آئینہ) اور ثابتات (تخلیق) میں تجربات کرسکتے ہیں۔ براہ کرم /دستاویز کے ذیلی صفحہ پر زمرہ جات شامل فرمائیں۔ اس سانچہ کے ذیلی صفحات۔ |