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 Ember

Date:04/20/05
Author:Phil Homewood
URL:n/a
Comments:0
Info:n/a
Score: (3.02 in 113 votes)
#!/usr/local/ember/bin/ember

/* 99 Bottles of Ember Fluid                                  */
/* Phil Homewood dot@atat.dotat.org, 20020905                 */
/* Written in Ember, http://www.hughes.com.au/products/ember/ */

funct yob (int $nbot, int $f)
{
  if ($nbot == 1) { $s = ""; } else { $s = "s"; }
  if ($f==0) {
    if ($nbot == 0) {
      echo ("no more bottles of beer on the wall.\n");
      return (0);
    }
    echo ("$nbot bottle$s of beer on the wall.\n\n");
  }
  echo ("$nbot bottle$s of beer on the wall,\n$nbot bottle$s of beer,\n");
  $nbot--;
  echo ("take one down, pass it around,\n");
  if ($nbot >= 0) { return (yob ($nbot, 0)); }
}

yob (99, 1);

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: