Template:Val: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Ktr101
Undid revision 593983054 by Ktr101 (talk) Apparently, this was never tested beforehand
meta>Headbomb
revert to actually stable version
Line 29: Line 29:
                 -->{{{p|}}}<!-- If p (prefix) is defined, display it.
                 -->{{{p|}}}<!-- If p (prefix) is defined, display it.
                 -->{{#if: {{{1|}}}|<!-- Are there any arguments?
                 -->{{#if: {{{1|}}}|<!-- Are there any arguments?
                  -->{{#if: {{{2|}}}|{{#if: {{{e|}}}|{{#if: {{{3|}}}||(}}}}}}<!-- Add parentheses if there is ±-error and exponent
                   -->{{val/delimitnum|fmt={{{fmt|gaps}}}|{{{1|}}}}}{{{end|}}}<!-- Output arg1, formatted.
                   -->{{val/delimitnum|fmt={{{fmt|gaps}}}|{{{1|}}}}}{{{end|}}}<!-- Output arg1, formatted.
                   -->{{#if: {{{2|}}}|<!-- Are there 2 or more arguments?
                   -->{{#if: {{{2|}}}|<!-- Are there 2 or more arguments?
                     -->{{#if: {{{3|}}}|<!-- Are there 3 arguments?
                     -->{{#if: {{{3|}}}|<!-- Are there 3 arguments?
                       --><span style="white-space:nowrap;margin-left:0.3em;">{{su|<!-- Uncertainty = +X -Y (3 arguments)
                       --><span style="white-space:nowrap;margin-left:0.3em;">{{su|<!-- Uncertainty = +X -Y (3 arguments)
                         -->a=r|<!-- Fixed width, right aligned
                         -->w=f|a=r|<!-- Fixed width, right aligned
                         -->p=+{{val/delimitnum|fmt={{{fmt|gaps}}}|{{{2}}}}}{{{+errend|}}}|<!-- Output +arg2, formatted.
                         -->p=+{{val/delimitnum|fmt={{{fmt|gaps}}}|{{{2}}}}}{{{+errend|}}}|<!-- Output +arg2, formatted.
                         -->b={{val/delimitnum|fmt={{{fmt|gaps}}}|{{{3}}}}}{{{-errend|}}}<!-- Output -arg3, formatted.
                         -->b={{val/delimitnum|fmt={{{fmt|gaps}}}|{{{3}}}}}{{{-errend|}}}<!-- Output -arg3, formatted.
Line 42: Line 41:
                         -->{{{2}}}<!-- Significance = (X)
                         -->{{{2}}}<!-- Significance = (X)
                       -->|<!-- Second argument is "(number)"? NO
                       -->|<!-- Second argument is "(number)"? NO
                         --><span style="white-space:nowrap;margin-left:0.3em;margin-right:0.15em">±</span>{{val/delimitnum|fmt={{{fmt|gaps}}}|{{{2}}}}}{{{errend|}}}<!-- Uncertainty = ±X
                         --><span style="white-space:nowrap;margin-left:0.3em;margin-right:0.15em">{{unicode|±}}</span>{{val/delimitnum|fmt={{{fmt|gaps}}}|{{{2}}}}}{{{errend|}}}<!-- 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: {{{2|}}}|{{#if: {{{e|}}}|{{#if: {{{3|}}}||)}}}}}}<!-- close parentheses
                   -->{{#if:{{{e|}}}|<span style="white-space:nowrap;margin-left:0.25em;margin-right:0.15em">×</span>10<sup>{{val/delimitnum|fmt={{{fmt|gaps}}}|{{{e}}}}}</sup>}}<!-- e=exponent
                   -->{{#if:{{{e|}}}|<span style="white-space:nowrap;margin-left:0.25em;margin-right:0.15em">×</span>10<sup>{{val/delimitnum|fmt={{{fmt|gaps}}}|{{{e}}}}}</sup>}}<!-- e=exponent
                 -->|<!-- Are there any arguments? NO
                 -->|<!-- Are there any arguments? NO

Revision as of 18:46, 5 February 2014