/// Implementation of Ninety-Nine Bottles of Beer Song in C#.
/// What's neat is that .NET makes the Binge class a
/// full-fledged component that may be called from any other
/// .NET component.
///
/// Paul M. Parks
/// http://www.parkscomputing.com/
/// February 8, 2002
///
using System;
namespace NinetyNineBottles
{
/// <summary>
/// References the method of output.
/// </summary>
public delegate void Writer(string format, params object[] arg);
/// <summary>
/// References the corrective action to take when we run out.
/// </summary>
public delegate int MakeRun();
/// <summary>
/// The act of consuming all those beverages.
/// </summary>
public class Binge
{
/// <summary>
/// What we'll be drinking.
/// </summary>
private string beverage;
/// <summary>
/// The starting count.
/// </summary>
private int count = 0;
/// <summary>
/// The manner in which the lyrics are output.
/// </summary>
private Writer Sing;
/// <summary>
/// What to do when it's all gone.
/// </summary>
private MakeRun RiskDUI;
public event MakeRun OutOfBottles;
/// <summary>
/// Initializes the binge.
/// </summary>
/// <param name="count">How many we're consuming.</param>
/// <param name="disasterWaitingToHappen">
/// Our instructions, should we succeed.
/// </param>
/// <param name="writer">How our drinking song will be heard.</param>
/// <param name="beverage">What to drink during this binge.</param>
public Binge(string beverage, int count, Writer writer)
{
this.beverage = beverage;
this.count = count;
this.Sing = writer;
}
/// <summary>
/// Let's get started.
/// </summary>
public void Start()
{
while (count > 0)
{
Sing(
@"
{0} bottle{1} of {2} on the wall,
{0} bottle{1} of {2}.
Take one down, pass it around,",
count, (count == 1) ? "" : "s", beverage);
count--;
if (count > 0)
{
Sing("{0} bottle{1} of {2} on the wall.",
count, (count == 1) ? "" : "s", beverage);
}
else
{
Sing("No more bottles of {0} on the wall.", beverage);
}
}
Sing(
@"
No more bottles of {0} on the wall,
No more bottles of {0}.", beverage);
if (this.OutOfBottles != null)
{
count = this.OutOfBottles();
Sing("{0} bottles of {1} on the wall.", count, beverage);
}
else
{
Sing("First we weep, then we sleep.");
Sing("No more bottles of {0} on the wall.", beverage);
}
}
}
/// <summary>
/// The song remains the same.
/// </summary>
class SingTheSong
{
/// <summary>
/// Any other number would be strange.
/// </summary>
const int bottleCount = 99;
/// <summary>
/// The entry point. Sets the parameters of the Binge and starts it.
/// </summary>
/// <param name="args">unused</param>
static void Main(string[] args)
{
Binge binge =
new Binge("beer", bottleCount, new Writer(Console.WriteLine));
binge.OutOfBottles += new MakeRun(SevenEleven);
binge.Start();
}
/// <summary>
/// There's bound to be one nearby.
/// </summary>
/// <returns>Whatever would fit in the trunk.</returns>
static int SevenEleven()
{
Console.WriteLine("Go to the store, get some more...");
return bottleCount;
}
}
}
// C++ version of 99 Bottles of beer
// programmer: Tim Robinson timtroyr@ionet.net
// Corrections by Johannes Tevessen
#include <iostream>
using namespace std;
int main()
{
int bottles = 99;
while ( bottles > 0 )
{
cout << bottles << " bottle(s) of beer on the wall," << endl;
cout << bottles << " bottle(s) of beer." << endl;
cout << "Take one down, pass it around," << endl;
cout << --bottles << " bottle(s) of beer on the wall." << endl;
}
return 0;
}
// 99 bottles of beer, C++ template 'meta-programming' version
// By Arion Lei (philipl@cs.ust.hk)
#include <iostream.h>
template<int I>
class Loop {
public:
static inline void f () {
cout << I << " bottles of beer on the wall," << endl
<< I << " bottles of beer." << endl
<< "Take one down, pass it around," << endl
<< I-1 << " bottles of beer on the wall." << endl;
Loop<I-1>::f();
}
};
class Loop<0> {
public:
static inline void f () {
cout << "Go to the store and buy some more," << endl
<< "99 bottles of beer on the wall." << endl;
}
};
int main () {
Loop<3>::f();
return 0;
}
/* C-- version of 99 Bottles of beer (Bottles.c--) */
/* See http://www.cs.utexas.edu/users/tbone/c--/ */
/* Philipp Winterberg, http://www.winterbergs.de */
? include "WRITE.H--"
int b;
main ()
{
b = 99;
do {
WRITEINT(b);
WRITESTR(" bottle(s) of beer on the wall,\n");
WRITEINT(b);
WRITESTR(" bottle(s) of beer.\n");
WRITESTR("Take one down, pass it around,\n");
b--;
WRITEINT(b);
WRITESTR(" bottle(s) of beer on the wall.\n\n");
} while (b > 0);
}
#!/bin/csh
#
# C-Shell script version of 99 Bottles of Beer
#
set i = 100
while ($i > 0)
echo -n $i " bottles of beer on the wall"
echo $i " bottles of beer......"
set i = `expr $i - 1`
echo -n "take one down pass it around, " $i
echo "bottles of beer on the wall"
end
#end of script
/*
* 99 bottles of beer
*
* See:
* http://reality.sgi.com/csp/ioccc/noll/noll.html#calc
*/
for (i=99; i > 0;) {
/* current wall state */
some_bottles = (i != 1) ? "bottles" : "bottle";
print i, some_bottles, "of beer on the wall,",;
print i, some_bottles, "of beer!";
/* glug, glug */
--i;
print "Take one down and pass it around,",;
/* new wall state */
less = (i > 0) ? i : "no";
bottles = (i!=1) ? "bottles" : "bottle";
print less, bottles, "of beer on the wall!\n";
}
(* Caml Light version of 99 bottles of beer *)
(* Written by Bow-Yaw Wang (bywang@saul.cis.upenn.edu) *)
let rec bottles =
function 1 -> print_string "1 bottle of beer on the wall, 1 bottle of beer\n";
print_string "Take one down, pass it around,\n";
print_string "no more bottles of beer on the wall\n"
| n -> print_int n;
print_string " bottles of beer on the wall, ";
print_int n;
print_string " bottles of beer\n";
print_string "Take one down and pass it around,\n";
print_int (n-1);
print_string " bottles of beer on the wall\n";
bottles (n-1)
in
bottles 99;;
The "Do" loops are only there to make it look a bit nicer - otherwise it just
shoots through too fast to read. Feel free to remove them.All lines must be
ended with the Enter character (EXE) It may work on some other Casio models
as well.
For 99 -> K To 2 Step -1
Locate 1,1,K
Locate 4,1,"BOTTLES OF BEER ON"
Locate 4,2,"THE WALL"
50->X
Do
X - 1 ->X
LpWhile X =/=0
Locate 1,3,K
Locate 4,3,"BOTTLES OF BEER"
50->X
Do
X - 1 ->X
LpWhile X =/= 0
Locate 1,4,"YOU TAKE ONE DOWN"
20->X
Do
X - 1 ->X
LpWhile X =/= 0
Locate 1,5,"AND PASS IT AROUND"
20->X
Do
X - 1 ->X
LpWhile X =/= 0
Locate 1,6,K-1
If K > 1 Then Locate 4,6,"BOTTLES OF BEER ON"
Else Locate 4,6,"BOTTLE OF BEER ON"
Locate 4,7,"THE WALL"
ClrText
Next
"1 BOTTLE OF BEER ON"
" THE WALL"
50->X
Do
X - 1 ->X
LpWhile X =/=0
"1 BOTTLE OF BEER"
50->X
Do
X - 1 ->X
LpWhile X =/=0
"YOU TAKE IT DOWN"
20->X
Do
X - 1 ->X
LpWhile X =/=0
"AND PASS IT AROUND"
20->X
Do
X - 1 ->X
LpWhile X =/=0
"NO MORE BOTTLES OF
"BEER ON THE WALL"
0 REM PAYTON BYRD - 2002
1 ?CHR$(147): FOR I=99 TO 0 STEP -1
2 ?I;" BOTTLES OF BEER ON THE WALL,"
3 ?I;" BOTTLES OF BEER!"
4 ?I;" TAKE ONE DOWN, PASS IT AROUND,"
5 ?I-1;" BOTTLES OF BEER ON THE WALL!":?""
6 NEXT I
7 REM THIS SAMPLE WILL WORK ON VIC-20,
8 REM C=16/PLUS 4, C=64, AND C=128
Contributed by Valerie Harris (valerie@grin.net) with a little help from my friends
CDC = Control Data Corporation
NOS = Network Operating System
CCL = Cyber Control Language
It's the operating system control language of the cyber machine.
.PROC,DRV99*I,
COUNT = (*N=10,*F).
.HELP.
THIS PROC READS ARGUMENT COUNT, AND INITIALIZES
REGISTER COUNTER TO THAT VALUE.
THEN THIS PROC LOOPS FOR THAT MANY COUNTS, DECREMENTING
THE REGISTER COUNTER EVERY LOOP. DURING THE LOOP THIS PROC
CALLS PRN99 WHICH PRINTS MESSAGE FOR THAT COUNT
.HELP,COUNT.
THIS IS THE INITITAL COUNT, THE COUNT FROM WHICH TO DECREMENT.
.ENDHELP
.IF,NUM(COUNT),QUIT.
SET,R1=COUNT.
SET,R2=0.
WHILE,R1.GT.R2,LOOP.
BEGIN,PRN99,DRV99,R1.
SET,R1=R1-1.
ENDW,LOOP.
NOTE./NO BOTTLES OF BEER ON THE WALL
REVERT,NOLIST.
.ENDIF,QUIT.
REVERT,ABORT. NONNUMERIC PASSES
.PROC,PRN99*I,COUNT=(*N=10,*F).
.SET,K9=STRD(COUNT).
NOTE./K9 BOTTLES OF BEER ON THE WALL
NOTE./K9 BOTTLES OF BEER
NOTE./TAKE ONE DOWN, AND PASS IT AROUND/
REVERT,NOLIST.
-- 99 Bottles of Beer in Cecil
-- by David Eddyshaw, david@jeddyshaw.freeserve.co.uk
-- See http://www.cs.washington.edu/research/projects/cecil/www/cecil-home.html
method bob(n@int) {
if(n == 0, { "No more bottles".print },
{ if(n == 1, { "1 bottle".print },
{ n.print; " bottles".print })})
}
do (99, &(i) {
bob(99-i); " of beer on the wall,".print_line;
bob(99-i); " of beer;".print_line;
"Take one down and pass it around:".print_line;
bob(98-i); " of beer on the wall.\n".print_line;
});
io: MODULE
/*
The CHILL/2 compiler I use has no VARYING strings.
To tackle this inconvenience, I declare a record with variants..
*/
GRANT String, nul, OutS, OutL, OutC, OutI;
NEWMODE String = STRUCT(CASE OF
:s9 CHAR(9),
:s11 CHAR(11),
:s13 CHAR(13),
:s16 CHAR(16),
:s31 CHAR(31)
ESAC
);
SYN nul = C'00';
OutS: PROC(s String LOC); END OutS;
OutL: PROC(); END OutL;
OutC: PROC(c CHAR); END OutC;
OutI: PROC(i INT); END OutI;
END io;
beer: MODULE /* jr_31jan97 */
SEIZE String, nul, OutC, OutS, OutI, OutL <> USING io;
bottles: PROC(n INT, wall BOOL, end CHAR);
DCL s String;
IF n>1 THEN OutI(n); s.s9:=' Bottles'//nul;
ELSIF n=1 THEN s.s11:='one Bottle'//nul;
ELSIF n=0 THEN s.s16:='no more Bottles'//nul;
FI;
OutS(s); s.s9:=' of Beer'//nul; OutS(s);
IF wall THEN s.s13:=' on the Wall'//nul; OutS(s); FI;
OutC(end); OutL();
END bottles;
singTheSong: PROC();
DCL i INT, s String;
DO FOR i:=99 DOWN TO 1;
bottles(i, TRUE, ',');
bottles(i, FALSE, '.');
s.s31:='Take one down, pass it around,'//nul; OutS(s); OutL();
bottles(i-1, TRUE, '.');
OD;
END singTheSong;
END beer;
# Chipmunk Basic version of 99 Bottles of beer (Bottles.bas)
# See http://www.rahul.net/rhn/cbas.page.html
# Philipp Winterberg, http://www.winterbergs.de
1
2 FOR b=99 TO 1 STEP -1
3 ? b;" bottle(s) of beer on the wall,"
4 ? b;" bottle(s) of beer."
5 ? "Take one down, pass it around,"
6 ? b-1;" bottle(s) of beer on the wall." : ? " "
7 NEXT
;Written by Bill Ensinger (Bill222E@aol.com) on Saturday February 24, 1996
;8:00 - 9:41 pm Eastern Standard time at Taylor University.
;All praise to God; note that we just pass the beer, but don't drink!
(deftemplate beer
(field ninetynine))
(deffacts bottles
(beer (ninetynine 99)))
(defrule Bottlesninetynine ""
(beer (ninetynine ?bottlenum))
?fl <- (beer (ninetynine ?bottlenum))
(test (> ?bottlenum 2))
=>
(printout t ?bottlenum " bottles of beer on the wall," t)
(printout t ?bottlenum " bottles of beer." t)
(printout t "Take one down, pass it around," t)
(printout t (- ?bottlenum 1) " bottles of beer on the wall." t)
(printout t " " t)
(modify ?fl (ninetynine =(- ?bottlenum 1)))
)
(defrule Bottlestwo ""
(beer (ninetynine 2))
?fl <- (beer (ninetynine ?bottlenum))
=>
(printout t ?bottlenum " bottles of beer on the wall," t)
(printout t ?bottlenum " bottles of beer." t)
(printout t "Take one down, pass it around," t)
(printout t (- ?bottlenum 1) " bottle of beer on the wall." t)
(printout t " " t)
(modify ?fl (ninetynine =(- ?bottlenum 1)))
)
(defrule Bottlesone ""
(beer (ninetynine 1))
?fl <- (beer (ninetynine ?bottlenum))
=>
(printout t ?bottlenum " bottle of beer on the wall," t)
(printout t ?bottlenum " bottle of beer." t)
(printout t "Take one down, pass it around," t)
(printout t "No more bottles of beer on the wall!" t)
)
/* THIS IS WRITTEN IN CLIST - A IBM MVS/TSO BATCH LANGUAGE
/* THIS LINE IS A COMMENT
/* ALEX V FLINSCH SPARROWHAWK@WORLDNET.ATT.NET
PROC 0
SET BEER=99
A: WRITE &BEER BOTTLES OF BEER ON THE WALL
WRITE &BEER BOTTLES OF BEER
WRITE TAKE ONE DOWN AND PASS IT AROUND
SET BEER=&EVAL(&BEER-1)
IF &BEER ,= 0 THEN GOTO A
WRITE NO MORE BOTTLES OF BEER ON THE WALL
WRITE NO MORE BOTTLES OF BEER
% 99 bottles of beer in CLU by dcurtis@lcs.mit.edu
start_up = proc()
po: stream := stream$primary_output()
for i: int in int$from_to_by(99, 1, -1) do
if i = 1 then
stream$putl(po, int$unparse(i) || " bottle of beer on the wall")
stream$putl(po, int$unparse(i) || " bottle of beer...")
else
stream$putl(po, int$unparse(i) || " bottles of beer on the wall")
stream$putl(po, int$unparse(i) || " bottles of beer...")
end
stream$putl(po, "Take one down, pass it around...")
end
stream$putl(po, "\nTime to get more beer!")
end start_up
' COCOA version of 99 Bottles of beer (Bottles.cocoa)
' See http://www.mcmanis.com/~cmcmanis/java/javaworld/examples/BASIC.html
' Philipp Winterberg, http://www.winterbergs.de
'
' How to use:
' 1. Go to http://www.mcmanis.com/~cmcmanis/java/javaworld/examples/BASIC.html
' 2. Copy only the code line below (it is a single line!)
' 3. Paste it into COCOA window
' 4. Press enter and enjoy ;)
for b=99 to 1 step -1:print b;" bottle(s) of beer on the wall,":print b;"
bottle(s) of beer.":print "Take one down, pass it around,":print (b-1);"
bottle(s) of beer on the wall.":print " ":next b
By S. Isaac Dealey
<cfscript>
for ( x = 99 ; x gt 1 ; x = x - 1) {
WriteOutput("#x# bottles of beer on the wall...<br>#x# bottles of beer!<br>");
WriteOutput("Take one down, pass it around...<br>";
}
WriteOutput("1 bottle of beer on the wall...<br>1 bottle of beer!<br>");
WriteOutput("Take one down, pass it around...<br>No bottles of beer on the wall");
</cfscript>
By S. Isaac Dealey
<cfscript>
function beerSong(x) {
b = iif(x gt 1, DE("bottles"), DE("bottle"));
if (x) {
WriteOutput("#x# #b# of beer on the wall...<br>#x# #b# of beer!</br>");
WriteOutput("Take one down, pass it around...<br>";
beerSong( x - 1 );
}
else
{
WriteOutput("No bottles of beer on the wall");
}
}
beerSong(99);
</cfscript>
<!--- 99 Bottles of Beer in Cold Fusion by Steven Reich tauman@earthlink.net --->
<!--- Additions by Michael Dinowitz --->
<HTML>
<HEAD>
<TITLE>Bottles of Beer</TITLE>
</HEAD>
<BODY>
<CFLOOP INDEX="idx" FROM="99" TO="2" STEP="-1">
<CFOUTPUT>
#idx# Bottles of Beer on the wall, #idx# Bottles of Beer,
<BR>Take one down, pass it around, #Evaluate(idx - 1)# Bottles of
Beer on the wall
<P>
</CFOUTPUT>
</CFLOOP>
1 Bottle of Beer on the wall, 1 Bottle of Beer,
<BR>Take one down, pass it around, no Bottles of Beer on the wall
</BODY>
</HTML>
;;; The format string in Common Lisp is almost a
;;; language on its own. Here's a Lisp version
;;; that shows its power. Hope you find it
;;; entertaining.
(in-package "CL-USER")
(defun bottle-song (&optional (in-stock 99) (stream *standard-output*))
;; Original idea and primary coding by Geoff Summerhayes
;; <sumrnot@hotmail.com>
;; Formatting idea by Fred Gilham <gilham@snapdragon.csl.sri.com>
;; Actual formatting & minor recoding by Kent M Pitman
;; <pitman@world.std.com>
(format
stream
"-----~2%~
~{~&~1&~
~[~^~:;~
~1:*~@(~
~R~) bo~
ttle~:P o~
f beer on t~
he wall~01:*~[.~
~:;,~%~1:*~@(~R~
~) bottle~:*~P ~
of beer.~%You t~
ake one down, p~
ass it around, ~
~01%~[*No* more~
~:;~:01*~@(~R~)~
~] bottle~:*~P ~
of beer on the ~
wall.~2&-----~%~
~1%~:*~]~]~}~0%"
(loop for bottle from in-stock downto 0 collect bottle)))
(bottle-song)
;; Bottles by Rebecca Walpole (walpolr@cs.orst.edu)
;; tested in Austin Kyoto Common Lisp version 1.615
;; Note: the ~p takes care of plurals.
;;
(defun bottles (n)
"Prints the lyrics to '99 Bottles of Beer'"
(if (< n 1)
(format t "~%Time to go to the store.~%")
(progn (format t "~% ~a bottle~:p of beer on the wall." n)
(format t "~% ~a bottle~:p of beer." n)
(format t "~% Take one down, pass it around.")
(format t "~% ~a bottle~:p of beer on the wall.~%" (- n 1))
(bottles (- n 1))
)
)
)
(bottles 99)
> ComWic version of 99 Bottles of beer (Bottles.cwx)
> See http://www.tcdn.teiher.gr/upload/viewfiles.asp?catid=03
> Philipp Winterberg, http://www.winterbergs.de
>
CLS
MOV 1,99
*LOOP
ECHO 1
ECHO
> bottle(s) of beer on the wall,
ECHO 1
ECHO
> bottle(s) of beer.
> Take one down, pass it around,
SUB 1,1
ECHO 1
ECHO
> bottle(s) of beer on the wall.
IF NUM,$1,<,1,END WICHTELCHEN
>
GOTO LOOP
//language Concurrent Clean - lazy pure functional
// Author: Jan Krynicky (jkry3025@comenius.mff.cuni.cz)
module beer
import StdEnv
//run with console and no constructors (don't want to make windows, menu ...)
Start = genbeer 99
where
genbeer 0 = ["No more bottles of beer on the wall.\n", //We are all drunk enough.
"No more bottles of beer.\n", //so sad!
"Go to the store and buy some more.\n" //If you can fin it.
: genbeer 99]
//Go on, let's drink forever.
genbeer n = [sn+++" Bottle(s) of beer on the wall, "
+++ sn +++ " bottle(s) of beer.\n",
"Take one down and pass it around.\n",
toString(n-1)+++ " bottle(s) of beer on the wall."
:genbeer (n-1)]
where
ns = toString(n)
//end
-- Cool, a language used for teaching compilers
-- http://www.cs.berkeley.edu/~aiken/cool/
-- By Kirsten Chevalier -- krc AT cs DOT berkeley DOT edu
class Beer inherits IO {
numberOfBeers : Int <- 99;
song () : Object {
if (numberOfBeers = 0) then
out_string("Time to buy more beer!\n")
else
{
out_int(numberOfBeers);
out_string(" bottles of beer on the wall,\n");
out_int(numberOfBeers);
out_string(" bottles of beer\nTake one down, pass it around\n");
out_int(numberOfBeers);
out_string(" bottles of beer on the wall.\n");
numberOfBeers <- numberOfBeers - 1;
song();
}
fi
};
};
class Main {
main () : Object {
(new Beer).song()
};
};
<a href=http://www.corvu.com.au>CorVu</a> is an integrated business intelligence suite
bottles = 99;
(bottles > 0)
?*
(
text = ((bottles > 1) ? " bottles" : " bottle");
display(bottles, text, " of beer on the wall,");
newline();
display(bottles, text, " of beer,");
newline();
display("Take one down, and pass it around,");
newline();
bottles = bottles - 1;
(bottles > 0)
?
(
text = ((bottles > 1) ? " bottles" : " bottle");
display(bottles, text, " of beer on the wall.")
)
:
(
display("No more bottles of beer on the wall.")
);
newline(2)
);
display("No more bottles of beer on the wall,");
newline();
display("No more bottles of beer,");
newline();
display("Go to the store and buy some more,");
newline();
display("99 bottles of beer on the wall.");
newline()
# 99 Bottles for "the CRM114 Discriminator"
# Dave Plonka - plonka@doit.wisc.edu, Mar 15 2003
# with modifications by WSY
window
isolate (:n:)
alter (:n:) /99/
isolate (:s:)
alter (:s:) /s/
{
# print starting preamble of verse
output /:*:n: bottle:*:s: of beer on the wall,:*:_nl:/
output /:*:n: bottle:*:s: of beer:*:_nl:/
# actually decrement the bottles
output /take one down, pass it around,:*:_nl:/
syscall ( :*:n:-1:*:_nl: ) (:n:) /bc/
# remove the trailing new-line:
match (:n:) [:n:] /[0-9]+/
# handle the one case (get rid of the "s")
{
match [:n:] /^1$/
alter (:s:) //
}
# handle the zero case:
match <absent> [:n:] /^0$/
# and if we get to here, we're nonzero on bottles, so go round again.
output /:*:n: bottle:*:s: of beer on the wall.:*:_nl::*:_nl:/
liaf
}
output /no more bottles of beer on the wall.:*:_nl:/
CUPL is the Cornell University Programming Language (c. 1966)
COMMENT 99 BOTTLES IN CUPL (CORNELL UNIVERSITY PROGRAMMING LANGUAGE, C. 1966)
COMMENT DAVE PLONKA - PLONKA@DOIT.WISC.EDU
COMMENT FEB 17 1998
LET N = 99
PERFORM SONG WHILE N GT 2
LINES BLOCK
WRITE /N, ' BOTTLES OF BEER ON THE WALL,'
WRITE /N, ' BOTTLES OF BEER,'
LINES END
LINE BLOCK
WRITE 'TAKE ONE DOWN, PASS IT AROUND,'
LINE END
SONG BLOCK
PERFORM LINES
PERFORM LINE
LET N = N - 1
WRITE /N, ' BOTTLES OF BEER ON THE WALL.'
WRITE ''
SONG END
PERFORM LINES
PERFORM LINE
WRITE '1 BOTTLE OF BEER ON THE WALL.'
WRITE ''
WRITE '1 BOTTLE OF BEER ON THE WALL,'
WRITE '1 BOTTLE OF BEER,'
PERFORM LINE
WRITE 'NO BOTTLES OF BEER ON THE WALL.'
STOP
|| Curl version of 99 Bottles of beer (Bottles.curl)
|| http://www.curl.com/html/
|| Philipp Winterberg, http://www.winterbergs.de
||
{curl 1.7 applet}
{value
let b:int=99
let song:VBox={VBox}
{while b > 0 do
{song.add b & " bottle(s) of beer on the wall,"}
{song.add b & " bottle(s) of beer."}
{song.add "Take one down, pass it around,"}
set b = b - 1
{song.add b & " bottle(s) of beer on the wall."}
}
song
}