The data in a switch can be anything, by the way, text or more templates, not just numbers. The example data above are the decimal digits of pi.
That gives the value for "b". Multiplying by x is another simple #expr: {{#expr:b * {{{1}}}}}
So the whole thing would be something like:
{{#expr:{{#switch:{{#expr:{{{2}}} - c}}|list of table values here}} * {{{1}}}}}
The main help resource for advanced expressions in template syntax is at mw:Help:Extension:ParserFunctions, but if you need more help feel free to ask me. •
Anakin(talk) 14:40, 31 October 2009 (UTC)
The data in a switch can be anything, by the way, text or more templates, not just numbers. The example data above are the decimal digits of pi.
That gives the value for "b". Multiplying by x is another simple #expr: {{#expr:b * {{{1}}}}}
So the whole thing would be something like:
{{#expr:{{#switch:{{#expr:{{{2}}} - c}}|list of table values here}} * {{{1}}}}}
The main help resource for advanced expressions in template syntax is at mw:Help:Extension:ParserFunctions, but if you need more help feel free to ask me. •
Anakin(talk) 14:40, 31 October 2009 (UTC)