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 AML

Date:04/20/05
Author:Anonymous
URL:n/a
Comments:0
Info:n/a
Score: (2.94 in 17 votes)
/* AML (Arc Macro Language) version of 99 bottles of beer on the wall
/* Author prefers anonymity B-)
/*
 
&do number = 9 &to 1 &by -1
   /* handle the one bottle cases
   &if %number% = 1 &then
      &set noun1 = bottle
   &else 
      &set noun1 = bottles
   &if %number% = 2 &then
      &set noun2 = bottle
   &else 
      &set noun2 = bottles
 
   &type \%number% %noun1% of beer on the wall,
   &type %number% %noun1% of beer,
   &type Take one down, pass it around,
   &type [calc %number% - 1] %noun2% of beer on the wall
&end
&return

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: