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 Kalkulon

Date:06/07/05
Author:Juergen Holetzeck
URL:n/a
Comments:0
Info:http://www.kalkulon.de
Score: (3.00 in 19 votes)
/* Kalkulon version of 99 Bottles of beer      */
/* Juergen Holetzeck                           */
/* http://www.kalkulon.de                      */
/*                                             */
/* How to run:                                 */
/* save as bottles.k                           */
/* run  Kalkulon.exe                           */
/* type Load("bottles.k")                      */
/* type bottles(99)                            */

bottles(n)=
(
    s1 = "bottle(s) of beer on the wall",
    s2 = "bottle(s) of beer",
    s3 = "Take one down, pass it around,",
    f1 = "%i %s,",
    f2 = "%i %s.",
    
    bottles = n,
    while ( bottles > 0; 
        PrintLn(Sprintf(f1, {bottles, s1})),
        PrintLn(Sprintf(f2, {bottles, s2})),
        PrintLn(s3),
        PrintLn(Sprintf(f2, {--bottles, s1}))
    )
);

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: