/* Create an HTML table. 6/2011 */ create: procedure options (main); create_table: procedure (headings, table_contents); declare headings(*) character (10) varying; declare table_contents(*, *) fixed; declare (i, row, col) fixed; put skip edit ('
| ') (a); /* For an empty column heading */ do i = 1 to hbound(headings); put edit (' | ', headings(i), ' | ' ) (a); end; put edit ('
|---|---|
| ', row, ' | ') (a); /* row contents */ do col = 1 to hbound(table_contents, 2); put edit ('', table_contents(row, col), ' | ' ) (a); end; put edit ('