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 Definer

(standard version)

Date:04/20/05
Author:Chris Sauls
URL:n/a
Comments:0
Info:n/a
Score: (1.00 in 1 votes)
\{
	 Program: :99 Bottles
	Platform: :Definer (Console)
	  Author: :Chris Sauls
	    Date: :06.03.2003
\}

include std console;

define unsigned byte {
	BottleCount	= 99;
}

define string {
	SBottles	= " bottles of beer";
	SWall		= " on the wall";
	SPeriod		= ".\n";
}

\{ Main Routine \}
{
	while BottleCount {
		Console:WriteLine (BottleCount, SBottles + SWall + SPeriod);
		Console:WriteLine (BottleCount, SBottles + SPeriod);
		Console:WriteLine ("Take one down, pass it around.\n");
		Console:WriteLine (
			--BottleCount
			? BottleCount
			| "No more"
			, SBottles, SWall, SPeriod
		);
	}
}

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
object-oriented versionChris Sauls04/20/050

Comments

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: