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 mIRC

(shorter + faster version)

Date:05/13/05
Author:coolpix
URL:n/a
Comments:5
Info:http://www.coolpix.org
Score: (2.97 in 32 votes)
alias beer {
  var %x 99
  while (%x > 0) {
    echo  %x Bottles of beer on the wall, %x bottles of beer
    echo  Take one down and pass it around,
    dec %x
    echo  %x bottles of beer on the wall.
    echo  $chr(160)
  }
  echo No more bottles of beer on the wall.
  echo No more bottles of beer...
}

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
Correct plurals and uses more functions.IceShaman08/11/050

Comments

>>  Brain said on 07/29/05 16:25:06

Brain Great, wheres my beer? :)

>>  Sunbun said on 08/10/05 22:05:10

Sunbun ahaha! great script.

>>  Ceil said on 08/13/05 07:29:59

Ceil try makin' that one line:

echo %x $iif(%x == 1,bottle,bottles) of beer on the wall.

otherwise gr00vie o/

>>  Moo said on 02/25/06 01:10:17

Moo %x $+(bottle,$iif(%x != 1,s)) of beer on the wall.

>>  Edmund_Ogban said on 06/24/09 15:13:11

Edmund_Ogban alias 99bottles {
var %bottled = 99
var %bottle = %bottled
while (%bottled isnum) {
if (!%bottled) %bottled = no more
echo -a %bottled bottle $+ $iif(%bottled != 1,s) of beer on the wall, %bottled bottle $+ $iif(%bottled != 1,s) of beer.
echo -a Take one down and pass it around, %bottled bottle $+ $iif(%bottled != 1,s) of beer on the wall.
dec %bottled
}
echo -a Go to the store and buy some more, %bottle bottles of beer on the wall.
}

:D

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: