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 Pop

Date:04/20/05
Author:Anonymous
URL:n/a
Comments:1
Info:n/a
Score: (3.33 in 3 votes)
define beer(n);

    define :inline PLURAL(N);
        (N==1 and nullstring or "s")
    enddefine;

    lvars i;
    for i from n by -1 to 1 do;
        nl(1);
        nprintf(PLURAL(i), i, '%P bottle%P of beer on the wall.');
        nprintf(PLURAL(i), i, '%P bottle%P of beer!');
        nprintf(i==1 and "it" or "one", 'Take %P down, pass it around.');
        if i>1 then
            nprintf(PLURAL(i-1), i-1, '%P more bottle%S of beer on the wall.');
        else
            npr('No more bottles of beer on the wall.');
        endif;
    endfor;

enddefine;

beer(100);

Download Source | Write Comment

Alternative Versions

Comments

>>  Joe said on 12/28/05 02:31:52

Joe Nice, clean and short.

Just what you would expect from pop11.

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: