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 NewtonScript

Date:04/20/05
Author:Walter Smith
URL:n/a
Comments:1
Info:n/a
Score: (3.02 in 97 votes)
By Walter Smith.

BeerSong := {
  Drink: func ()
    for b:= 99 to 1 do begin
      Print(:Bob(b) & " on the wall, " & :Bob(b) & ".\n");
      Print("Take one down, pass it around, " & :Bob(b-1) &
            " on the wall.\n");
    end,

  Bob: func (i)
    if i = 0 then
      return "no more bottles of beer"
    else if i = 1 then
      return "1 bottle of beer"
    else
      return i & " bottles of beer",
};

Download Source | Write Comment

Alternative Versions

Comments

>>  Ian said on 09/26/05 21:55:42

Ian In case you didn't know, Walter Smith is the fine fellow who designed NewtonScript for Apple!

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: