Changes

Jump to: navigation, search

Template:Isnumeric/doc

1,182 bytes added, 00:15, 8 February 2020
Created page with "{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> This template tests whether a value is numeric (or at least, that it can be..."
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
This template tests whether a value is numeric (or at least, that it can be treated as such by the expression ParserFunction).

=== Usage ===
By default, simply writing <code><nowiki>{{Isnumeric|1,327}}</nowiki></code> (where 1,327 is an example number) will pass through the parameter if it's numeric and be blank if it's not. If the parameter <code>boolean=true</code> is given, as in <code><nowiki>{{Isnumeric|1,327|boolean=true}}</nowiki></code>, then the template will output <code>1</code> if numeric and <code>0</code> if not numeric.

=== Examples ===
<table class="wikitable">
<tr><th>code</th><th>result</th></tr>
{{Template example row|1,327.50}}
{{Template example row|9,999 (1950)}}
{{Template example row|9999999999999}}
{{Template example row|500 metres}}
{{Template example row|500*500}}
{{Template example row|9.999e50}}
{{Template example row|1+1}}
{{Template example row|}}
</table>

=== See also ===
* {{tl|ifnumber}}
* {{tl|px}}
* {{tl|int}}, {{tl|is num}}

<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->

[[Category:Metatemplates]]
</includeonly>



Navigation menu