Mine sisu juurde

Mall:Ifnumber/doc

Allikas: Vikipeedia

Tagastab 1, kui väärtus on numbriline ning muudel juhtudel 0.

coderesult
{{Ifnumber|1}}

1

{{Ifnumber|üks}}

0

{{Ifnumber|}}

0

{{Ifnumber|1|number|pole number}}

number

{{Ifnumber|one|number|pole number}}

pole number

{{Ifnumber|1000|number|pole number}}

number

{{Ifnumber|10.00|number|pole number}}

number

{{Ifnumber|1,000|number|pole number}}

pole number

{{Ifnumber|1,000.50|number|pole number}}

pole number

{{Ifnumber|99 balloons|number|pole number}}

pole number

{{Ifnumber|99.9999e10|number|pole number}}

number

{{Ifnumber|−123|number|pole number}}

number

{{Ifnumber|(456)|number|pole number}}

number

{{Ifnumber|{{val|123|5}}|number|väärtus "{{val|123|5}}" pole number}}  väärtus "123±5" pole number

See mall ei tunnista formaaditud numbreid, sest see teeks parsija katki. Formaatimise eemaldamiseks võib kasutada {{formatnum: number |R}}.

coderesult
{{Ifnumber|1,000.50|number|pole number}}pole number
{{Ifnumber|{{formatnum:1,000.50|R}}|number|pole number}}number