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 Ferite

(Using closures.)

Date:09/25/06
Author:Rowan Lewis
URL:http://pixelcarnage.net/
Comments:2
Info:http://ferite.org/
Score: (2.88 in 8 votes)
uses "console";

number bottles = 99;
boolean looping = true;
object counter = closure {
	if (--bottles > 0) {
		return true;
	} else {
		return false;
	}
};

while (looping) {
	Console.println("${bottles} bottles of beer on the wall,");
	Console.println("${bottles} bottles of beer,");
	Console.println("Take one down, pass it around,");
	
	looping = counter.invoke();
	
	Console.println("${bottles} bottles of beer on the wall.");
}

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
ObjectsRowan Lewis09/25/061

Comments

>>  Timothy "dcm" Eichholz said on 11/24/06 08:39:20

Timothy "dcm" Eichholz I believe it's bool, not boolean.

>>  Rowan Lewis said on 02/23/07 14:21:32

Rowan Lewis Nope, its boolean.

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: