class BEERS -- illustrates 99 bottles of beer on the wall with 99 -- replaced by 5 creation make feature -- Creation count : INTEGER is 5 make is local i : INTEGER b : STRING; do from i := count variant i until i <= 0 loop if i = 1 then b := " bottle"; else b := " bottles" end -- if io.put_integer(i); io.put_string(b); io.put_string(" of beer on the wall, "); io.put_integer(i); io.put_string(b); 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); io.put_string(b); io.put_string(" bottles of beer on the wall."); io.put_new_line; end -- loop io.put_string("Go to the store and buy some more,"); io.put_new_line; io.put_integer ( count ); io.put_string(" bottles of beer on the wall."); io.put_new_line; end; end -- class BEERS