// implementation of 99 bottles of beer using QtScript, // The ECMAScript 4.0 based langauge used in Qt Script for Applications (QSA). var beers = 99; function takeOne() { print( "take one down, pass it around" ); --beers; } function sing(on_the_wall) { print( beers + " bottles of beer" + on_the_wall ); } while (beers>=1) { sing( " on the wall!!" ); sing( "!!" ); takeOne(); sing( " on the wall!!" ); }