--- 'Pascal' like version -- class BEERS creation make feature make is local i : INTEGER btl : STRING; do from i := 9 until i = 0 loop io.put_new_line if i = 1 then btl := " bottle"; else btl := " bottles" end -- if io.put_integer(i); io.put_string(btl); io.put_string(" of beer on the wall, "); io.put_integer(i); io.put_string(btl); io.put_string(" of beer."); io.put_new_line; io.put_string("Take one down and pass it around, "); i := i - 1 io.put_integer(i); if i = 1 then btl := " bottle"; else btl := " bottles" end -- if io.put_string(btl); io.put_string(" of beer on the wall. "); io.put_new_line end -- loop io.put_string("%N%NGo to the store and buy some more,"); io.put_new_line; io.put_string("9 bottles of beer on the wall."); io.put_new_line; end; end -- class BEERS