Template:Val: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Jimp
short/long scale for links to "billion", "trillion" etc.
meta>Jimp
val now uses Module:Gappnum so precision is no longer a problem
Line 2: Line 2:
--><span class="nowrap"><!--
--><span class="nowrap"><!--
START ERROR CHECKING:
START ERROR CHECKING:
-->{{#ifeq:{{valid|number={{{1|0}}}}}|false|<!-- Is arg1 not a valid number?
-->{{#iferror:{{#expr:{{{1|0}}}}}<!-- Is arg1 not a valid number?
   -->{{FormattingError|Error in {{tl|val}}: first argument is not a valid number or requires too much precision to display.|nocategory={{{nocategory|}}}}}<!--
   -->|{{FormattingError|Error in {{tl|val}}: first argument is not a valid number.|nocategory={{{nocategory|}}}}}<!--
-->|<!-- Is arg1 not a valid number? NO
  -->|{{#iferror:{{#expr:{{{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.|nocategory={{{nocategory|}}}}}<!--
     -->{{FormattingError|Error in {{tl|val}}: second argument is not a valid number or requires too much precision to display.|nocategory={{{nocategory|}}}}}<!--
    -->|{{#iferror:{{#expr:{{{3|0}}}}}<!-- Is arg3 not a valid number?
  -->|<!-- Is arg2 not a valid number? NO
       -->|{{FormattingError|Error in {{tl|val}}: third argument is not a valid number.|nocategory={{{nocategory|}}}}}<!--
    -->{{#ifeq:{{valid|number={{{3|0}}}}}|false|<!-- Is arg3 not a valid number?
      -->|{{#ifexpr: {{{3|-1}}} > 0<!-- Is arg3 positive or -0?
       -->{{FormattingError|Error in {{tl|val}}: third argument is not a valid number or requires too much precision to display.|nocategory={{{nocategory|}}}}}<!--
         -->|{{FormattingError|Error in {{tl|val}}: third argument is not negative.|nocategory={{{nocategory|}}}}}<!--
    -->|<!-- Is arg3 not a valid number? NO
        -->|{{#iferror:{{#expr:{{{e|0}}}}}<!-- Is arg "e" not a valid number?
      -->{{#ifexpr: {{{3|-1}}} > 0|<!-- Is arg3 positive or -0?
           -->|{{FormattingError|Error in {{tl|val}}: exponent ('''e''') is not a valid number.|nocategory={{{nocategory|}}}}}<!--
         -->{{FormattingError|Error in {{tl|val}}: third argument is not negative.|nocategory={{{nocategory|}}}}}<!--
          -->|{{#ifeq:{{{u}}}{{{ul}}}|{{{u|}}}{{{ul|}}}<!-- Is arg "u" and "ul" specified?
      -->|<!-- Is arg3 positive? NO
               -->|{{FormattingError|Error in {{tl|val}}: unit ('''u''') and units with link ('''ul''') are both specified, only one is allowed.|nocategory={{{nocategory|}}}}}<!--
        -->{{#ifeq:{{valid|number={{{e|0}}}}}|false|<!-- Is arg "e" not a valid number?
              -->|{{#ifeq:{{{up}}}{{{upl}}}|{{{up|}}}{{{upl|}}}<!-- Is arg "up" and "upl" specified?
           -->{{FormattingError|Error in {{tl|val}}: exponent ('''e''') is not a valid number or requires too much precision to display.|nocategory={{{nocategory|}}}}}<!--
                 -->|{{FormattingError|Error in {{tl|val}}: unit per ('''up''') and units per with link ('''upl''') are both specified, only one is allowed.|nocategory={{{nocategory|}}}}}<!--
        -->|<!-- Is arg "e" not a valid number? NO
                -->|<!-- Is arg "up" and "upl" specified? NO
            -->{{#ifeq:{{{u}}}{{{ul}}}|{{{u|}}}{{{ul|}}}|<!-- Is arg "u" and "ul" specified?
               -->{{FormattingError|Error in {{tl|val}}: unit ('''u''') and units with link ('''ul''') are both specified, only one is allowed.|nocategory={{{nocategory|}}}}}<!--
            -->|<!-- Is arg "u" and "ul" specified? NO
              -->{{#ifeq:{{{up}}}{{{upl}}}|{{{up|}}}{{{upl|}}}|<!-- Is arg "up" and "upl" specified?
                 -->{{FormattingError|Error in {{tl|val}}: unit per ('''up''') and units per with link ('''upl''') are both specified, only one is allowed.|nocategory={{{nocategory|}}}}}<!--
              -->|<!-- Is arg "up" and "upl" specified? NO
END OPENING OF ERROR CHECKING, START OUTPUT
END OPENING OF ERROR CHECKING, START OUTPUT



Revision as of 10:11, 29 April 2015