2016 Update

This commit is contained in:
Tina Müller 2016-12-05 22:15:40 +01:00
parent 948b86eafa
commit dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions

View file

@ -1,21 +1,22 @@
/*REXX program creates an HTML table of five rows and three columns. */
arg rows .; if rows=='' then rows=5 /*no ROWS specified? Then use default.*/
cols = 3 /*specify three columns for the table. */
maxRand = 9999 /*4-digit numbers, allows negative nums*/
headerInfo = 'X Y Z' /*specifify column header information. */
oFID = 'a_table.html' /*name of the output file. */
w = 0 /*number of writes to the output file. */
/*REXX program creates (and displays) an HTML table of five rows and three columns.*/
parse arg rows . /*obtain optional argument from the CL.*/
if rows=='' | rows=="," then rows=5 /*no ROWS specified? Then use default.*/
cols = 3 /*specify three columns for the table. */
maxRand = 9999 /*4-digit numbers, allows negative nums*/
headerInfo = 'X Y Z' /*specifify column header information. */
oFID = 'a_table.html' /*name of the output file. */
w = 0 /*number of writes to the output file. */
call wrt "<html>"
call wrt "<head></head>"
call wrt "<body>"
call wrt "<table border=5 cellpadding=20 cellspace=0>"
do r=0 to rows /* [↓] handle row 0 as being special.*/
if r==0 then call wrt "<tr><th></th>"
else call wrt "<tr><th>" r "</th>"
do r=0 to rows /* [↓] handle row 0 as being special.*/
if r==0 then call wrt "<tr><th></th>" /*when it's the zeroth row. */
else call wrt "<tr><th>" r "</th>" /* " " not " " " */
do c=1 for cols /* [↓] for row 0, add the header info*/
do c=1 for cols /* [↓] for row 0, add the header info*/
if r==0 then call wrt "<th>" word(headerInfo,c) "</th>"
else call wrt "<td align=right>" rnd() "</td>"
end /*c*/
@ -25,7 +26,7 @@ call wrt "</table>"
call wrt "</body>"
call wrt "</html>"
say; say w ' records were written to the output file: ' oFID
exit /*stick a fork in it, we're all done. */
/*────────────────────────────────────────────────────────────────────────────*/
rnd: return right(random(0,maxRand*2)-maxRand,5) /*REXX doesn't gen neg RANDs.*/
wrt: call lineout oFID,arg(1); say '' arg(1); w=w+1; return /*write.*/
exit /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
rnd: return right(random(0,maxRand*2)-maxRand,5) /*RANDOM doesn't generate negative ints*/
wrt: call lineout oFID,arg(1); say '' arg(1); w=w+1; return /*write.*/