RosettaCodeData/Task/Create-an-HTML-table/BBC-BASIC/create-an-html-table.bbc

31 lines
702 B
Plaintext

ncols% = 3
nrows% = 4
*spool temp.htm
PRINT "<html><head></head><body>"
PRINT "<table border=1 cellpadding=10 cellspacing=0>"
FOR row% = 0 TO nrows%
IF row% = 0 THEN
PRINT "<tr><th></th>" ;
ELSE
PRINT "<tr><th>" ; row% "</th>" ;
ENDIF
FOR col% = 1 TO ncols%
IF row% = 0 THEN
PRINT "<th>" CHR$(87 + col%) "</th>" ;
ELSE
PRINT "<td align=""right"">" ; RND(9999) "</td>" ;
ENDIF
NEXT col%
PRINT "</tr>"
NEXT row%
PRINT "</table>"
PRINT "</body></html>"
*spool
SYS "ShellExecute", @hwnd%, 0, "temp.htm", 0, 0, 1