Source of 99bottlesOfBeer_v3.stt

<!-- $Header$ -->

<!-- another improved version 
  --   use #bindWith: to construct the strings
  -->

<html>
  <head>
    <title>99 Bottles of Beer</title>
  </head>

  <body bgcolor=white>
    <h2>STT example: 99 Bottles of Beer</h2>
<?stt 
    [
	99 to:1 by:-1 do:[:bottles |
	  |remain|

	  remain := bottles - 1.

	  response 
	    nextPutLine:('<p> %1 bottle%2 of beer on the wall, %1 bottle%2 of beer.<br>'
			 bindWith:bottles 
			 with:((bottles = 1) ifTrue:'' ifFalse:'s'));
	    nextPutLine:('Take one down and pass it around, %1 bottle%2 of beer on the wall.<br>'
			 bindWith:((remain = 0) ifTrue:'no more' ifFalse:remain)
			 with:((remain = 1) ifTrue:'' ifFalse:'s')).
	].
    ] value
?>
    <p>
    More of this is found at <a href="http://99-bottles-of-beer.ls-la.net/">http://99-bottles-of-beer</a>
    <p>
    <hr><address>Beer served by your friendly <a href=http://www.exept.de>ST/X WebServer</a></address>
  </body>
</html>

  

Served by your friendly ST/X WebServer