Create an HTML table: Difference between revisions
m
→{{header|FutureBasic}}: Inserted code indents
m (→{{header|C++}}: LANG -> syntaxhighlight) |
m (→{{header|FutureBasic}}: Inserted code indents) |
||
Line 2,413:
local fn BuildHTMLTable
NSinteger i, j▼
CFMutableStringRef mutStr = fn MutableStringWithCapacity(0)▼
▲NSinteger i, j
▲CFMutableStringRef mutStr = fn MutableStringWithCapacity(0)
MutableStringAppendString( mutStr, @"
for j = 1 to 3▼
MutableStringAppendString( mutStr, @" <tr><th></th>" )▼
MutableStringAppendFormat( mutStr, @"<th>%c</th>", _W + j )▼
▲for j = 1 to 3
next▼
▲MutableStringAppendFormat( mutStr, @"<th>%c</th>", _W + j )
▲next
for i = 1 to 3▼
MutableStringAppendString( mutStr, @"</tr>\n" )▼
MutableStringAppendFormat( mutStr, @" <tr><td>%d</td>", i )▼
▲for i = 1 to 3
for j = 1 to 3▼
▲MutableStringAppendFormat( mutStr, @" <tr><td>%d</td>", i )
MutableStringAppendFormat( mutStr, @"<td>%d</td>", rnd( 10000 ) )▼
▲for j = 1 to 3
next▼
▲MutableStringAppendFormat( mutStr, @"<td>%d</td>", rnd( 10000 ) )
▲ MutableStringAppendString( mutStr, @"</tr>\n" )
▲next
next▼
MutableStringAppendString( mutStr, @"</
▲next
NSLog( @"%@", mutStr )▼
▲MutableStringAppendString( mutStr, @"</table>" )
▲NSLog( @"%@", mutStr )
end fn
Line 2,438 ⟶ 2,437:
HandleEvents
</syntaxhighlight>
{{ HTML code output:}}
<pre>
|