Source of multiplication.stt

<?stt
    |genTable|

    genTable := [:rows :cols |
	|genRow|

	genRow := [:y |
	    |genCol|

	    genCol := [:x |
		response nextPutAll:'<td width=5% align=center>'.
		response nextPutAll:(x * y) printString.
		response nextPutLine:'</td>'.
	   ].

	    response nextPutLine:'<tr>'.
	    1 to:cols do:genCol.
	    response nextPutLine:'</tr>'.
	].

	1 to:rows do:[:y |
	    genRow value:y.
	].
    ].
?>

<!-- $Header: /cvs/stx/stx/goodies/webServer/data/comancheSTT/multiplication.stt,v 1.5 2003/09/16 22:55:09 cg Exp $ -->

<html>
  <head>
    <title>Multiplication Table</title>
  </head>
  <body bgcolor=white>
    <h2>STT example: Multiplication Table</h2>
    <table border=1> 
      <?stt genTable value:10 value:10 ?> 
    </table>
    <hr><address>Served by your friendly <a href=http://www.exept.de>ST/X WebServer</a></address>
  </body>
</html>

  

Served by your friendly ST/X WebServer