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 Euphoria

(standard version)

Date:04/20/05
Author:Don Phillips
URL:n/a
Comments:2
Info:http://www.rapideuphoria.com
Score: (3.03 in 30 votes)
-- Euphoria
-- www.rapideuphoria.com
--
-- Author: Don Phillips
-- 
atom Beers
sequence Bottles

Beers = 99
while Beers != 0 do
	Bottles = "Bottle" & (Beers!=1)*'s'
	printf( 1, "%d %s of beer on the wall,\n", {Beers,Bottles} )
	printf( 1, "%d %s of beer.\n", {Beers,Bottles} )
	printf( 1, "Take one down, pass it around,\n", {} )
	Beers -= 1
	Bottles = "Bottle" & (Beers!=1)*'s'
	printf( 1, "%d %s of beer on the wall.\n\n", {Beers,Bottles} )
end while

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
alternative versionD. Stanger04/20/050

Comments

>>  F. Bruni said on 12/21/09 01:27:18

F. Bruni Maybe what I remember of Euphoria is wrong but don't you have to declare Bottles as well? Like:

Bottles = ""

>>  evanmars said on 03/30/10 21:56:27

evanmars No. It is declared in
sequence Bottles
then it is initialized in
Bottles = "Bottle" & (Beers!=1)*'s', instead of "" you have "Bottle" & (Beers!=1)*'s'

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: