Create an HTML table: Difference between revisions

obsolete
m (Changed output.)
(obsolete)
Line 464:
<td align="right">203</td>
</tr>
</table>
 
=={{header|Arturo}}==
 
<lang arturo>use ~web
 
table @tbl #{
row #{
cell ""
cell "X" #{ :header true }
cell "Y" #{ :header true }
cell "Z" #{ :header true }
}
 
join $(map $(range 0 3) {
r $(row #{
cell $(toString &) #{ :header true }
cell $(toString|random 0 1000)
cell $(toString|random 0 1000)
cell $(toString|random 0 1000)
})
r.render
}) ""
}
 
print $(tbl.render)</lang>
 
{{out}}
 
<lang html><table id='tbl'>
<tr>
<td></td>
<th>X</th>
<th>Y</th>
<th>Z</th>
</tr>
<tr>
<th>0</th>
<td>85</td>
<td>785</td>
<td>85</td>
</tr>
<tr>
<th>1</th>
<td>80</td>
<td>156</td>
<td>37</td>
</tr>
<tr>
<th>2</th>
<td>457</td>
<td>960</td>
<td>814</td>
</tr>
<tr>
<th>3</th>
<td>360</td>
<td>154</td>
<td>433</td>
</tr>
</table></lang>
 
<table id='tbl'>
<tr>
<td></td>
<th>X</th>
<th>Y</th>
<th>Z</th>
</tr>
<tr>
<th>0</th>
<td>85</td>
<td>785</td>
<td>85</td>
</tr>
<tr>
<th>1</th>
<td>80</td>
<td>156</td>
<td>37</td>
</tr>
<tr>
<th>2</th>
<td>457</td>
<td>960</td>
<td>814</td>
</tr>
<tr>
<th>3</th>
<td>360</td>
<td>154</td>
<td>433</td>
</tr>
</table>
 
1,532

edits