Template:Get cell/doc: Difference between revisions
Appearance
Content deleted Content added
Sophivorus (talk | contribs) Update docs |
Sophivorus (talk | contribs) No edit summary |
||
Line 19: | Line 19: | ||
| 45,773,884 |
| 45,773,884 |
||
| 2,796,427 |
| 2,796,427 |
||
| {{#expr: {{Get cell|B2|population-table}} / {{Get cell|B3|population-table}} }} |
| {{#expr: {{Get cell|B2|population-table}} / {{Get cell|B3|population-table}} }} |
||
|- |
|- |
||
| China |
| China |
||
| 1,425,671,352 |
| 1,425,671,352 |
||
| 9,600,000 |
| 9,600,000 |
||
| {{#expr: {{Get cell|C2|population-table}} / {{Get cell|C3|population-table}} }} |
| {{#expr: {{Get cell|C2|population-table}} / {{Get cell|C3|population-table}} }} |
||
|- |
|- |
||
| United States |
| United States |
||
| 339,996,564 |
| 339,996,564 |
||
| 9,833,517 |
| 9,833,517 |
||
| {{#expr: {{Get cell|D2|population-table}} / {{Get cell|D3|population-table}} }} |
| {{#expr: {{Get cell|D2|population-table}} / {{Get cell|D3|population-table}} }} |
||
|} |
|} |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
Line 44: | Line 44: | ||
| 45,773,884 |
| 45,773,884 |
||
| 2,796,427 |
| 2,796,427 |
||
| {{#expr: {{Get cell|B2|population-table|Template:Get cell/doc}} / {{Get cell|B3|population-table|Template:Get cell/doc}} }} |
| {{#expr: {{Get cell|B2|population-table|Template:Get cell/doc}} / {{Get cell|B3|population-table|Template:Get cell/doc}} }} |
||
|- |
|- |
||
| China |
| China |
||
| 1,425,671,352 |
| 1,425,671,352 |
||
| 9,600,000 |
| 9,600,000 |
||
| {{#expr: {{Get cell|C2|population-table|Template:Get cell/doc}} / {{Get cell|C3|population-table|Template:Get cell/doc}} }} |
| {{#expr: {{Get cell|C2|population-table|Template:Get cell/doc}} / {{Get cell|C3|population-table|Template:Get cell/doc}} }} |
||
|- |
|- |
||
| United States |
| United States |
||
| 339,996,564 |
| 339,996,564 |
||
| 9,833,517 |
| 9,833,517 |
||
| {{#expr: {{Get cell|D2|population-table|Template:Get cell/doc}} / {{Get cell|D3|population-table|Template:Get cell/doc}} }} |
| {{#expr: {{Get cell|D2|population-table|Template:Get cell/doc}} / {{Get cell|D3|population-table|Template:Get cell/doc}} }} |
||
|} |
|} |
Revision as of 12:30, 30 April 2024
![]() | This is a documentation subpage for Template:Get cell. It may contain usage information, categories and other content that is not part of the original template page. |
![]() | This template uses Lua: |
This template serves to calculate a table cell out of the values of other cells.
Example
The following wikitext:
{| class="wikitable" id="population-table"
! Country
! Population
! Area
! Density
|-
| Argentina
| 45,773,884
| 2,796,427
| {{#expr: {{Get cell|B2|population-table}} / {{Get cell|B3|population-table}} round 0 }}
|-
| China
| 1,425,671,352
| 9,600,000
| {{#expr: {{Get cell|C2|population-table}} / {{Get cell|C3|population-table}} round 0 }}
|-
| United States
| 339,996,564
| 9,833,517
| {{#expr: {{Get cell|D2|population-table}} / {{Get cell|D3|population-table}} round 0 }}
|}
Will output the following table:
Country | Population | Area | Density |
---|---|---|---|
Argentina | 45,773,884 | 2,796,427 | 16 |
China | 1,425,671,352 | 9,600,000 | 149 |
United States | 339,996,564 | 9,833,517 | 35 |