Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language QtScript

Date:04/20/05
Author:Anonymous
URL:n/a
Comments:0
Info:n/a
Score: (2.96 in 23 votes)
// 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!!" );
}

Download Source | Write Comment

Alternative Versions

Comments

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!

Name:

eMail:

URL:

Security Code:
  
Comment: