Difference between revisions of "Template:Ntsh"

From Ava Zinn Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(lets try again)
(updated code that will fail gracefully)
Line 1: Line 1:
<includeonly>{{{{{|safesubst:}}}#if:{{{1|}}}|<span style="{{{{{|safesubst:}}}#ifeq:{{{debug|}}}|yes|border:1px solid|display:none}}">&{{{{{|safesubst:}}}#ifexpr:{{{1}}}>=1e16|~|{{{{{|safesubst:}}}#expr:floor({{{1}}}/1e15)}}{{{{{|safesubst:}}}#expr:floor({{{1}}}/1e14) mod 10}}{{{{{|safesubst:}}}#expr:floor({{{1}}}/1e13) mod 10}}{{{{{|safesubst:}}}#expr:floor({{{1}}}/1e12) mod 10}}{{{{{|safesubst:}}}#expr:floor({{{1}}}/1e11) mod 10}}{{{{{|safesubst:}}}#expr:floor({{{1}}}/1e10) mod 10}}{{{{{|safesubst:}}}#expr:floor({{{1}}}/1e9) mod 10}}{{{{{|safesubst:}}}#expr:floor({{{1}}}/1e8) mod 10}}{{{{{|safesubst:}}}#expr:floor({{{1}}}/1e7) mod 10}}{{{{{|safesubst:}}}#expr:floor({{{1}}}/1e6) mod 10}}{{{{{|safesubst:}}}#expr:floor({{{1}}}/1e5) mod 10}}{{{{{|safesubst:}}}#expr:floor({{{1}}}/1e4) mod 10}}{{{{{|safesubst:}}}#expr:floor({{{1}}}/1e3) mod 10}}{{{{{|safesubst:}}}#expr:floor({{{1}}}/100) mod 10}}{{{{{|safesubst:}}}#expr:floor({{{1}}}/10) mod 10}}{{{{{|safesubst:}}}#expr:floor{{{1}}} mod 10}}{{{{{|safesubst:}}}padleft:{{{{{|safesubst:}}}#expr:floor(1e6*({{{1}}}-floor{{{1}}}))}}|6|0}}}}</span>}}</includeonly><noinclude>{{documentation}}</noinclude>
+
{{#if:{{{1|}}}
 +
|<span style="{{#ifeq:{{{debug|}}}|yes
 +
  |border:1px solid
 +
  |display:none
 +
  }}">{{#iferror:{{#expr:{{{1}}}-1}}
 +
    |{{{1}}}[[Category:Articles using Template:Ntsh for a non numeric value]]
 +
    |{{Number table sorting/{{#ifexpr:{{formatnum:{{{1}}}|R}}<0
 +
      |negative
 +
      |positive
 +
      }}
 +
      |1={{#expr:abs {{formatnum:{{{1}}}|R}}}}
 +
    }}
 +
  }}</span>{{#ifeq:{{{debug|}}}|yes|&nbsp;{{{1}}}}}
 +
}}

Revision as of 19:17, 3 September 2011