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

(Correct plurals and uses more functions.)

Date:08/11/05
Author:IceShaman
URL:n/a
Comments:0
Info:http://www.mirc.com
Score: (2.90 in 10 votes)
alias beer {
  var %x = 99, %phrase = bottles of beer on the wall, %phrase2 = Take one down and pass it around
  while ($calc(%x + 1)) {
    var %y = $iif(%x,%x,No more), %z = $remove(%phrase,$iif(%x == 1,s))
    echo $+(,%y) %z $+ , $lower(%y) $gettok(%z,1-3,32) $+ . | dec %x
    if ($calc(%x + 1) > 0) { 
      echo %phrase2 $+ , $lower($iif(%x,%x,No more)) $+($remove(%phrase,$iif(%x == 1,s)),.) 
      echo $+(,$chr(160))
    }
    else { echo Go to the store and buy some more, 99 $+(%phrase,.) | return }    
  }
}

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
shorter + faster versioncoolpix05/13/055

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: