Template talk:2D array demo

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search

[edit] Documentation

[edit] Wikitext

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.

}}


[edit] Purpose

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

[edit] Usage

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

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

[edit] Examples

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.

[edit] See also

[edit] History

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

Contents


[edit] Discussion

Personal tools
Namespaces

Variants
Actions
Navigation
Community
Beyond the Web
Toolbox