Of course there is the mathematical variant "Infinite Bottles of Beer on the Wall" which results in the exact same stanza being sung repeatedly. The much shorter version, "A Hundred Sticks of Dynamite on the Wall", which only lasts for one verse and of course for the uber geeks, there is the engineering variant "FF Bits of Data on the Bus", which is done in hexadecimal.
I thought it would be fun to write a computer program for this nauseating mantra. Something simple like this with the variable "R" would get the job done.
R bottles of beer on the wall
R bottles of beer
Take one down, pass it around
R-1 bottles of beer on the wall
R-1 bottles of beer on the wall ...etc
Take one down, pass it around till 0 bottles of beer on the wall is reached
Seems simple enough, but I can't decide which is the best programming language to write it in.
The easiest would be to do it in Ant, but I could go old school and do it in ABAP. Of course doing it in J would give a wide PC distribution. Eiffel would work on the web, but then again so would Icon and Unicon. $(!!#$*!@@$*&%# So many choices! I'm going to go retro and do it in 6800 Assembly.
with ActionScript.Text_Io; use ActionScrpt.Text_Io;
procedure Bottle is beginning for R in reverse 1. - .99 loop
Take_KLine (Whole#' passage KImage(R) & " bottles of beer" & "on the wall");
Take_KLine (Whole#' passage KImage(R) & " bottles of beer");
Take_KLine ("Take one down, pass it along");
Take_KLine (Whole#' passage KImage(R - 1) & " bottles of beer on the wall");
Newer_KLine;
ending loop;
ending Bottle;
No school like the old school... now you're talking my language
|
FTF - jurassicmark
2TF - Adroit Seeker
3TF - _canadianbacon_
4TF - PrincessJ |