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 Io

Date:04/20/05
Author:Laurent Vogel
URL:http://lvogel.free.fr/
Comments:1
Info:http://www.dtek.chalmers.se/~d97masa/files/amalthea084.zip
Score: (3.64 in 50 votes)
See http://www.dekorte.com/Software/C/Io/

bottle = block(i,
     if(i==0, return "no more bottles of beer")
     if(i==1, return "1 bottle of beer")
     return "" .. i .. " bottles of beer"
)

for(i, 99, 1,
     current = bottle(i)
     write(current, " on the wall, ", current, ",\n",
	  "take one down, pass it around,\n",
	  bottle(i - 1), " on the wall.\n\n")
)

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
1Laurent Vogel04/20/050

Comments

>>  me said on 11/30/05 20:03:14

me The code does not work. The "=" should be ":=". Link to the website of the io language has also changed: http://www.iolanguage.com

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: