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 Limbo

Date:04/20/05
Author:Anonymous
URL:n/a
Comments:1
Info:n/a
Score: (2.80 in 15 votes)
Limbo is compiler for Lucent Technologies new Inferno Operating System.

implement BeerBottles;

include "sys.m";
	sys: Sys;
include "draw.m";
	draw: Draw;

BeerBottles: module
{
	init: fn(ctxt: ref Draw->Context, agv: list of string);
};

init(ctxt: ref Draw->Context, argv: list of string)
{
	sys = load Sys Sys->PATH;
	for (int bottles = 99; bottles > 0; bottles--) {
		sys->print("%d bottle(s) of beer on the wall,\n",bottles);
		sys->print("%d bottle(s) of beer.\n",bottles);
		sys->print("Take one down, pass it around,\n");
		sys->print("%d bottle(s) of beer on the wall.\n\n");
	}
}

Download Source | Write Comment

Alternative Versions

Comments

>>  david aiello said on 11/30/06 05:13:56

david aiello Sweet

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: