Template talk:2D array demo

From Meta, a Wikimedia project coordination wiki

Documentation[edit]

Wikitext[edit]

This Template:2D array demo (talk, backlinks, edit) contains:


{{array |index={{{1}}} |2,2=4 |2,3=6 |3,2=6 |3,3=9 |default=n.a. }}


Purpose[edit]

This template contains a very small demo multiplication table, which is also a demo of a 2D array in general.

Usage[edit]

{{2D array demo
 |a
 |b
}}

gives ab for values in the table, "n.a." otherwise.

Examples[edit]

Code Result
{{2D array demo|2,2}} 4
{{2D array demo|2,3}} 6
{{2D array demo|3,2}} 6
{{2D array demo|3,3}} 9
{{2D array demo|2,4}} n.a.

{{for|sep=,|1|2|3|4|call=2D array demo|prefix=2,}} gives 4161n.a.

{{for|sep=,|1|2|3|4|call=2D array demo|prefix=3,}} gives 6191n.a.

{{for|sep=,|1|2|3|4|call=2D array demo|postfix=,2}} gives 4161n.a.

{{for|sep=,|1|2|3|4|call=2D array demo|postfix=,3}} gives 6191n.a.

See also[edit]

History[edit]

Created
Patrick 23:50, 15 December 2005 (UTC)[reply]

Discussion[edit]