Template:Val: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>SkyLined
Undid revision 206042724 by SkyLined (talk)
meta>SkyLined
Updated checks to use {{valid|number=...}} and fixed small error in inline comment.
Line 7: Line 7:
--><span style="white-space:nowrap"><!--
--><span style="white-space:nowrap"><!--
START ERROR CHECKING:
START ERROR CHECKING:
-->{{#if:{{#ifexpr: {{{1}}}}}|<!-- Is arg1 not a valid number?
-->{{#ifeq:{{valid|number={{{1}}}}}|false|<!-- Is arg1 not a valid number?
   -->{{FormattingError|Error in {{tl|val}}: first argument is not a valid number.}}<!--
   -->{{FormattingError|Error in {{tl|val}}: first argument is not a valid number.}}<!--
-->|<!-- Is arg1 not a valid number? NO
-->|<!-- Is arg1 not a valid number? NO
   -->{{#if:{{#ifexpr: {{{2|0}}}}}|<!-- Is arg2 not a valid number?
   -->{{#ifeq:{{valid|number={{{2|0}}}}}|false|<!-- Is arg2 not a valid number?
     -->{{FormattingError|Error in {{tl|val}}: second argument is not a valid number.}}<!--
     -->{{FormattingError|Error in {{tl|val}}: second argument is not a valid number.}}<!--
   -->|<!-- Is arg2 not a valid number? NO
   -->|<!-- Is arg2 not a valid number? NO
     -->{{#if:{{#ifexpr: {{{3|0}}}}}|<!-- Is arg3 not a valid number?
     -->{{#ifeq:{{valid|number={{{3|0}}}}}|false|<!-- Is arg3 not a valid number?
       -->{{FormattingError|Error in {{tl|val}}: third argument is not a valid number.}}<!--
       -->{{FormattingError|Error in {{tl|val}}: third argument is not a valid number.}}<!--
     -->|<!-- Is arg3 not a valid number? NO
     -->|<!-- Is arg3 not a valid number? NO
Line 19: Line 19:
         -->{{FormattingError|Error in {{tl|val}}: third argument is not negative.}}<!--
         -->{{FormattingError|Error in {{tl|val}}: third argument is not negative.}}<!--
       -->|<!-- Is arg3 positive? NO
       -->|<!-- Is arg3 positive? NO
         -->{{#if:{{#ifexpr: {{{e|0}}}}}|<!-- Is arg "e" not a valid number?
         -->{{#ifeq:{{valid|number={{{e|0}}}}}|false|<!-- Is arg "e" not a valid number?
           -->{{FormattingError|Error in {{tl|val}}: exponent (e) is not a valid number.}}<!--
           -->{{FormattingError|Error in {{tl|val}}: exponent (e) is not a valid number.}}<!--
         -->|<!-- Is arg "e" not a valid number? NO
         -->|<!-- Is arg "e" not a valid number? NO
           -->{{#ifeq:{{{u|{{{up|}}}}}}|{{{up}}}|<!-- Is arg "up" specified but not arg "u"?
           -->{{#ifeq:{{{u|{{{up|}}}}}}|{{{up}}}|<!-- Is arg "up" specified but not arg "u"?
             -->{{FormattingError|Error in {{tl|val}}: unit (u) is not specified but units per (up) is.}}<!--
             -->{{FormattingError|Error in {{tl|val}}: unit (u) is not specified but units per (up) is.}}<!--
           -->|<!-- Is arg "e" not a valid number? NO
           -->|<!-- Is arg "up" specified but not arg "u"? NO
END ERROR CHECKING, START OUTPUT
END ERROR CHECKING, START OUTPUT
             -->{{{h|}}}<!-- h=Header
             -->{{{h|}}}<!-- h=Header

Revision as of 17:13, 16 April 2008