Jump to content

User:Patrick/2t: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
Perhaps the most familiar example of subscripts is in [[chemical formula]]s. For example, the formula for [[glucose]] is [[Carbon|C]]<sub>6</sub>[[Hydrogen|H]]<sub>12</sub>[[Oxygen|O]]<sub>6</sub>, meaning that it is a molecule with 6 [[carbon]] atoms, 12 [[hydrogen]] atoms and six [[oxygen]] atoms. Subscripts are also used frequently in mathematics to define different versions of the same variable; for example, in an equation ''x''<sub>0</sub> and ''x''<sub>f</sub> may indicate the initial and final value of ''x'', while ''v''<sub>rocket</sub> and ''v''<sub>observer</sub> would stand for the velocities of a rocket and an observer.
{{#iferror:{{#expr:1+1}}|1|0}}
{{#iferror:{{#expr:1+1}}|1}}
{{#iferror:{{#expr:1+1}}}}

{{#iferror:{{#expr:1+a}}|1|0}}
{{#iferror:{{#expr:1+a}}|1}}
{{#iferror:{{#expr:1+a}}}}

123: {{ #if: {{#ifexpr: 123 }} || action if PAGENAME is a number (or correct numeric expression) }}

123a: {{ #if: {{#ifexpr: 123a }} || action if PAGENAME is a number (or correct numeric expression) }}

123: {{ #iferror: {{#expr: 123+0 }} || action if PAGENAME is a number (or correct numeric expression) }}

123a: {{ #iferror: {{#expr: 123a+0 }} || action if PAGENAME is a number (or correct numeric expression) }}

Latest revision as of 10:20, 22 March 2008

Perhaps the most familiar example of subscripts is in chemical formulas. For example, the formula for glucose is C6H12O6, meaning that it is a molecule with 6 carbon atoms, 12 hydrogen atoms and six oxygen atoms. Subscripts are also used frequently in mathematics to define different versions of the same variable; for example, in an equation x0 and xf may indicate the initial and final value of x, while vrocket and vobserver would stand for the velocities of a rocket and an observer.