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
'~'1
CFMutableStringRef mutStr = fn MutableStringWithCapacity(0)
NSinteger i, j
CFMutableStringRef mutStr = fn MutableStringWithCapacity(0)
MutableStringAppendString( mutStr, @"</table style=\"width:15%\">\n" )
 
MutableStringAppendString( mutStr, @"<table style=\"width:15%\" <tr><th></th>\n" )
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 )
MutableStringAppendString( mutStr, @" </tr><th></th>\n" )
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, @"</trtable>\n" )
next
NSLog( @"%@", mutStr )
MutableStringAppendString( mutStr, @"</table>" )
NSLog( @"%@", mutStr )
end fn
 
Line 2,438 ⟶ 2,437:
HandleEvents
</syntaxhighlight>
 
{{ HTML code output:}}
<pre>
416

edits