YAPC::EU 2018 Glasgow Update!
This commit is contained in:
parent
22f33d4004
commit
4e2d22a71d
1170 changed files with 15042 additions and 3047 deletions
34
Task/Create-an-HTML-table/Ring/create-an-html-table.ring
Normal file
34
Task/Create-an-HTML-table/Ring/create-an-html-table.ring
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# Project: Create an HTML table
|
||||
|
||||
load "stdlib.ring"
|
||||
|
||||
str = ""
|
||||
ncols = 3
|
||||
nrows = 4
|
||||
|
||||
str = str + "<html><head></head><body>" + windowsnl()
|
||||
str = str + "<table border=1 cellpadding=10 cellspacing=0>" + windowsnl()
|
||||
|
||||
for row = 0 to nrows
|
||||
if row = 0
|
||||
str = str + "<tr><th></th>"
|
||||
else
|
||||
str = str + "<tr><th>" + row + "</th>"
|
||||
ok
|
||||
for col = 1 to ncols
|
||||
if row = 0
|
||||
str = str + "<th>" + char(87 + col) + "</th>"
|
||||
else
|
||||
str = str + "<td align=" + '"right"' + ">" + random(9999) + "</td>"
|
||||
ok
|
||||
next
|
||||
str = str + windowsnl() + "</tr>" +windowsnl()
|
||||
next
|
||||
|
||||
str = str + "</table>" + windowsnl()
|
||||
str = str + "</body></html>" + windowsnl()
|
||||
|
||||
remove("temp.htm")
|
||||
write("temp.htm",str)
|
||||
see str + nl
|
||||
systemcmd("temp.htm")
|
||||
Loading…
Add table
Add a link
Reference in a new issue