Template:Val: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>SkyLined
(Removed u=%, added f argument, changed white-space to pre and changed   to spaces)
meta>SkyLined
(Removed n and s check - they are no longer used anywhere. Undid change to white-space:pre)
Line 5: Line 5:
Normally, the code for the template is included, but this template is too complex to do that.
Normally, the code for the template is included, but this template is too complex to do that.
--></noinclude><includeonly><!--
--></noinclude><includeonly><!--
--><span style="white-space:pre"><!--
--><span style="white-space:nowrap"><!--
START ERROR CHECKING:
START ERROR CHECKING:
  -->{{#if: {{{n|}}}|<!-- Is there an argument "n"?
-->{{#if:{{#ifexpr: {{eval|{{{1}}}}}}}|<!-- Is arg1 not a valid number?
    -->{{FormattingError|Error in {{tl|val}}: argument "n" is deprecated.}}<!--
  -->{{FormattingError|Error in {{tl|val}}: first argument is not a valid number.}}<!--
  -->|<!-- Is there an argument "n"? NO
-->|<!-- Is arg1 not a valid number? NO
    -->{{#if: {{{s|}}}|<!-- Is there an argument "s"?
  -->{{#if:{{#ifexpr: {{eval|{{{2|0}}}}}}}|<!-- Is arg2 not a valid number?
      -->{{FormattingError|Error in {{tl|val}}: argument "s" is deprecated.}}<!--
    -->{{FormattingError|Error in {{tl|val}}: second argument is not a valid number.}}<!--
    -->|<!-- Is there an argument "s"? NO
  -->|<!-- Is arg2 not a valid number? NO
      -->{{#if:{{#ifexpr: {{evalns|{{{1}}}}}}}|<!-- Is arg1 not a valid number?
    -->{{#if:{{#ifexpr: {{eval|{{{3|0}}}}}}}|<!-- Is arg3 not a valid number?
        -->{{FormattingError|Error in {{tl|val}}: first argument is not a valid number.}}<!--
      -->{{FormattingError|Error in {{tl|val}}: third argument is not a valid number.}}<!--
      -->|<!-- Is arg1 not a valid number? NO
    -->|<!-- Is arg3 not a valid number? NO
        -->{{#if:{{#ifexpr: {{evalns|{{{2|0}}}}}}}|<!-- Is arg2 not a valid number?
      -->{{#ifexpr: {{eval|{{{3|-1}}}}} >= 0|<!-- Is arg3 positive?
          -->{{FormattingError|Error in {{tl|val}}: second argument is not a valid number.}}<!--
        -->{{FormattingError|Error in {{tl|val}}: third argument is not negative.}}<!--
        -->|<!-- Is arg2 not a valid number? NO
      -->|<!-- Is arg3 positive? NO
          -->{{#if:{{#ifexpr: {{evalns|{{{3|0}}}}}}}|<!-- Is arg3 not a valid number?
        -->{{#if:{{#ifexpr: {{eval|{{{e|0}}}}}}}|<!-- Is arg "e" not a valid number?
            -->{{FormattingError|Error in {{tl|val}}: third argument is not a valid number.}}<!--
          -->{{FormattingError|Error in {{tl|val}}: exponent is not a valid number.}}<!--
          -->|<!-- Is arg3 not a valid number? NO
        -->|<!-- Is arg "e" not a valid number? NO
            -->{{#ifexpr: {{evalns|{{{3|-1}}}}} >= 0|<!-- Is arg3 positive?
              -->{{FormattingError|Error in {{tl|val}}: third argument is not negative.}}<!--
            -->|<!-- Is arg3 positive? NO
              -->{{#if:{{#ifexpr: {{evalns|{{{e|0}}}}}}}|<!-- Is arg "e" not a valid number?
                -->{{FormattingError|Error in {{tl|val}}: exponent is not a valid number.}}<!--
              -->|<!-- Is arg "e" not a valid number? NO
END ERROR CHECKING, START OUTPUT
END ERROR CHECKING, START OUTPUT
                -->{{{h|}}}<!-- h=Header
          -->{{{h|}}}<!-- h=Header
                -->{{val/delimitnum|{{{1|}}}}}<!-- Output arg1, formatted.
          -->{{val/delimitnum|{{{1|}}}}}<!-- Output arg1, formatted.
                -->{{#if: {{{2|}}}|<!-- Are there 2 or more arguments?
          -->{{#if: {{{2|}}}|<!-- Are there 2 or more arguments?
                  --> <!-- space
            -->&nbsp;<!-- space
                  -->{{#if: {{{3|}}}|<!-- Are there 3 arguments?
            -->{{#if: {{{3|}}}|<!-- Are there 3 arguments?
                    -->{{su|w=f|<!-- Uncertainty = +X -Y (3 arguments)
              -->{{su|w=f|<!-- Uncertainty = +X -Y (3 arguments)
                      -->p=+{{val/delimitnum|{{{2}}}}}|<!-- Output +arg2, formatted.
                -->p=+{{val/delimitnum|{{{2}}}}}|<!-- Output +arg2, formatted.
                      -->b={{val/delimitnum|{{{3}}}}}<!-- Output -arg3, formatted.
                -->b={{val/delimitnum|{{{3}}}}}<!-- Output -arg3, formatted.
                    -->}}<!--
              -->}}<!--
                  -->|<!-- Are there 3 arguments? NO
            -->|<!-- Are there 3 arguments? NO
                    -->{{#if:{{#ifexpr: 0{{{2}}}}}|<!-- Second argument is "(number)"?
              -->{{#if:{{#ifexpr: 0{{{2}}}}}|<!-- Second argument is "(number)"?
                      -->{{{2}}}<!-- Significance = (X)
                -->{{{2}}}<!-- Significance = (X)
                    -->|<!-- Second argument is "(number)"? NO
              -->|<!-- Second argument is "(number)"? NO
                      -->&plusmn; {{val/delimitnum|{{{2}}}}}<!-- Uncertainty = ±X
                -->&plusmn;&nbsp;{{val/delimitnum|{{{2}}}}}<!-- Uncertainty = ±X
                    -->}}<!-- End second argument is "(number)"?
              -->}}<!-- End second argument is "(number)"?
                  -->}}<!-- End Are there 3 arguments?
            -->}}<!-- End Are there 3 arguments?
                -->}}<!-- End Are there 2 arguments?
          -->}}<!-- End Are there 2 arguments?
                -->{{#if:{{{e|}}}| × 10{{su|p={{val/delimitnum|{{{e}}}}}}}</sup>}}<!-- e=exponent
          -->{{#if:{{{e|}}}|&nbsp;×&nbsp;10{{su|p={{val/delimitnum|{{{e}}}}}}}</sup>}}<!-- e=exponent
                -->{{#if:{{{u|}}}| {{ScientificValue/units|{{{u}}}}}}}<!-- u=units  
          -->{{#if:{{{u|}}}|&nbsp;{{ScientificValue/units|{{{u}}}}}}}<!-- u=units  
                -->{{{f|}}}<!-- f=Footer
          -->{{{f|}}}<!-- f=Footer
              -->}}<!-- End Is arg "e" not a valid number?
        -->}}<!-- End Is arg "e" not a valid number?
            -->}}<!-- End Is arg3 positive?
      -->}}<!-- End Is arg3 positive?
          -->}}<!-- End Is arg3 not a valid number?
    -->}}<!-- End Is arg3 not a valid number?
        -->}}<!-- End Is arg2 not a valid number?
  -->}}<!-- End Is arg2 not a valid number?
      -->}}<!-- End Is arg1 not a valid number?
-->}}<!-- End Is arg1 not a valid number?
    -->}}<!-- End Is there an argument "s"?
  -->}}<!-- End Is there an argument "n"?
--></span><!--
--></span><!--
--></includeonly>
--></includeonly>

Revision as of 13:59, 15 April 2008