MODULE HtmlTable { tag$=LAMBDA$ (a$)-> { =LAMBDA$ a$ -> { IF ISNUM THEN w$=STR$(NUMBER,0) ELSE w$=LETTER$ READ ? part$ ="<"+a$+IF$(LEN(part$)>0->" "+part$,"")+">"+w$+""+CHR$(13)+CHR$(10) } } INVENTORY Fun STACK NEW { DATA "html", "head", "body", "table", "tr", "th", "td" WHILE NOT EMPTY OVER ' duplicate top of stack APPEND Fun, LETTER$:=tag$(LETTER$) END WHILE } DEF body0$="",body$="" STACK NEW { DATA "", "X", "Y", "Z" FOR i=1 TO 4 body0$+=Fun$("th")(LETTER$) z$="" FOR j=1 TO 3 : z$+=Fun$("td")(RANDOM(0, 9999), {align="right"}) : NEXT j body$+=Fun$("tr")(Fun$("th")(i)+z$) NEXT i } table$=fun$("table")(fun$("tr")(body0$)+body$,"border=1 cellpadding=10 cellspacing=0") DOCUMENT final$=""+CHR$(13)+CHR$(10) final$=fun$("html")(fun$("head")("")+fun$("body")(table$), {lang="en"}) file$="c:\doc.html" REPORT final$ CLIPBOARD final$ SAVE.DOC final$, file$ WIN file$ ' execute, no wait } HtmlTable